Skip to content

Commit

Permalink
do not use ranges on masox at git?
Browse files Browse the repository at this point in the history
  • Loading branch information
kilohsakul committed Sep 28, 2023
1 parent 580b899 commit d6469e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/nfa/nfa.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#include <algorithm>
#include <list>
#include <optional>
#include <unordered_set>
#include <iterator>
#include <ranges>

// MATA headers
#include "mata/utils/sparse-set.hh"
Expand Down Expand Up @@ -330,10 +328,10 @@ BoolVector Nfa::get_useful_states(bool stop_at_first_useful_state) const {
// propagate usefulness to the closed SCC
for(const State& st : scc) useful[st] = true;
// propagate usefulness to predecessors in @p tarjan_stack
for(const State& st :std::views::reverse(tarjan_stack)) {
if (useful[st])
for (auto st = tarjan_stack.rbegin(); st != tarjan_stack.rend(); ++st) {
if (useful[*st])
break;
useful[st] = true;
useful[*st] = true;
}
}
}
Expand Down

0 comments on commit d6469e1

Please sign in to comment.