diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-21 10:07:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-07-21 10:07:35 +0200 |
commit | d26940d7769a35a517195079d7b402b0b6eb3c92 (patch) | |
tree | 3529e42d7bc3de903382a2dfc566b74675f188f0 /src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h | |
parent | 43c28d4084a2c3e63cf02f45c03c9514ee8af2a4 (diff) | |
parent | 54e7255eb18b1247d7cfda2d6bc120dc9c0f119b (diff) | |
download | qtxmlpatterns-d26940d7769a35a517195079d7b402b0b6eb3c92.tar.gz |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: If5ed6ad45422c7cf8a250e31a10ce2930e5c1cf7
Diffstat (limited to 'src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h')
-rw-r--r-- | src/xmlpatterns/schema/qxsdstatemachine_tpl_p.h | 16 |
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; |