]> granicus.if.org Git - re2c/commitdiff
Break from loop if the remaining iterations have no effect.
authorUlya Trofimovich <skvadrik@gmail.com>
Sat, 30 Apr 2016 15:23:32 +0000 (16:23 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Sat, 30 Apr 2016 15:25:29 +0000 (16:25 +0100)
re2c/src/ir/dfa/fallback.cc

index 7a92750e4ef87f6e1fe518f32d4e3c2207fd63f4..94419036e22b3b1683b29db7bca3097e9541e963 100644 (file)
@@ -21,6 +21,7 @@ void fallback_states(const dfa_t &dfa, std::vector<size_t> &fallback)
                                if (j != dfa_t::NIL
                                        && dfa.states[j]->rule == Rule::NONE) {
                                        fallback.push_back(i);
+                                       break;
                                }
                        }
                }