summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-12-02 23:40:33 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-06-20 00:01:50 +0000
commit988fb7ba66b1c9ab014de625b5037203b3516495 (patch)
tree9179dd3c01180dfd589087f2cfc67c002a514b7b /src
parent5508d25baa41d4d16e58b0bdd3365a4eab54c734 (diff)
downloadqtxmlpatterns-988fb7ba66b1c9ab014de625b5037203b3516495.tar.gz
Fix compilation error with ICC 17: it doesn't like auto and comma
The error is a warning upgraded via -Werror and the message doesn't even make sense to me: error #3373: nonstandard use of "auto" to both deduce the type from an initializer and to announce a trailing return type Intel-Issue-ID: 6000164202 Change-Id: I73fa1e59a4844c43a109fffd148caf09a1952e92 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
index 2583bb9..1cb2e72 100644
--- a/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
+++ b/src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h
@@ -111,7 +111,9 @@ template <typename TransitionType>
void XsdStateMachine<TransitionType>::reset()
{
// reset the machine to the start state
- for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) {
+ auto it = m_states.cbegin();
+ auto end = m_states.cend();
+ for ( ; it != end; ++it) {
if (it.value() == StartState || it.value() == StartEndState) {
m_currentState = it.key();
return;
@@ -175,7 +177,9 @@ bool XsdStateMachine<TransitionType>::proceed(InputType input)
// fetch the transition entry for the current state
const QHash<TransitionType, QVector<StateId> > &entry = m_transitions[m_currentState];
- for (auto it = entry.cbegin(), end = entry.cend(); it != end; ++it) {
+ auto it = entry.cbegin();
+ auto end = entry.cend();
+ for ( ; it != end; ++it) {
if (inputEqualsTransition(input, it.key())) {
m_currentState = it.value().first();
m_lastTransition = it.key();
@@ -212,7 +216,9 @@ TransitionType XsdStateMachine<TransitionType>::lastTransition() const
template <typename TransitionType>
typename XsdStateMachine<TransitionType>::StateId XsdStateMachine<TransitionType>::startState() const
{
- for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) {
+ auto it = m_states.cbegin();
+ auto end = m_states.cend();
+ for ( ; it != end; ++it) {
if (it.value() == StartState || it.value() == StartEndState)
return it.key();
}
@@ -339,7 +345,9 @@ XsdStateMachine<TransitionType> XsdStateMachine<TransitionType>::toDFA() const
// search the start state as the algorithm starts with it...
StateId startState = -1;
- for (auto it = m_states.cbegin(), end = m_states.cend(); it != end; ++it) {
+ auto it = m_states.cbegin();
+ auto end = m_states.cend();
+ for ( ; it != end; ++it) {
if (it.value() == StartState) {
startState = it.key();
break;