diff --git a/src/nfa/nfa.cc b/src/nfa/nfa.cc index 4cef4d867..d403b0764 100644 --- a/src/nfa/nfa.cc +++ b/src/nfa/nfa.cc @@ -251,7 +251,7 @@ BoolVector Nfa::get_useful_states(bool stop_at_first_useful_state) const { // rec_call simulates call of the strongconnect. Since c++ cannot do continue over // multiple loops, we use rec_call to jump to the main loop bool rec_call = false; - while(act_state_data.current_move != act_state_data.end_move) { + for(;act_state_data.current_move != act_state_data.end_move;act_state_data.current_move++) { next_state = (*act_state_data.current_move).target; // if successor is useful, act_state is useful as well if(useful[next_state]) { @@ -264,7 +264,6 @@ BoolVector Nfa::get_useful_states(bool stop_at_first_useful_state) const { } else if(node_info[next_state].on_stack) { act_state_data.lowlink = std::min(act_state_data.lowlink, node_info[next_state].index); } - act_state_data.current_move++; } if(rec_call) continue;