diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-09-04 16:55:29 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-09-20 17:19:31 +0000 |
commit | b1b57225dbc8733935697e1895631969e9a95376 (patch) | |
tree | 0a7f40c74bd90e83f6600ed361f7ace81b4e6f86 /src/xmlpatterns/schema/qxsdstatemachine_p.h | |
parent | dba42c925db368aa958c38c6a3481f18a57bd71f (diff) | |
download | qtxmlpatterns-b1b57225dbc8733935697e1895631969e9a95376.tar.gz |
Eradicate Java-style loops (II): QSetIterator -> C++11 ranged for
Java-style iterators are slower than STL-style ones, so they
should not be used in library code.
Replaced them with C++11 ranged for loops, adding qAsConst()
as needed.
Change-Id: I21b59daceafc62b94ebba56bfef1f050988b9c9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/xmlpatterns/schema/qxsdstatemachine_p.h')
-rw-r--r-- | src/xmlpatterns/schema/qxsdstatemachine_p.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xmlpatterns/schema/qxsdstatemachine_p.h b/src/xmlpatterns/schema/qxsdstatemachine_p.h index 0ec8eb4..e535c8b 100644 --- a/src/xmlpatterns/schema/qxsdstatemachine_p.h +++ b/src/xmlpatterns/schema/qxsdstatemachine_p.h @@ -261,9 +261,7 @@ namespace QPatternist { QSet<StateId> result; - QSetIterator<StateId> it(states); - while (it.hasNext()) { // iterate over all given states - const StateId state = it.next(); + for (const StateId state : states) { // get the transition table for the current state const QHash<TransitionType, QVector<StateId> > transitions = m_transitions.value(state); |