From 44b2fd73be96b71a4d32d5181557c8d402c92da2 Mon Sep 17 00:00:00 2001 From: Lukas Holik Date: Thu, 28 Sep 2023 23:37:53 +0200 Subject: [PATCH] while -> for --- src/nfa/nfa.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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;