From ba6f638c40ddf62d534dd949d91696bb229e907f Mon Sep 17 00:00:00 2001 From: Justin Viiret Date: Thu, 10 Aug 2017 11:29:19 +1000 Subject: [PATCH] accel_dfa_build_strat: use flat_set --- src/nfa/accel_dfa_build_strat.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nfa/accel_dfa_build_strat.cpp b/src/nfa/accel_dfa_build_strat.cpp index 928e078e..1f1b5e02 100644 --- a/src/nfa/accel_dfa_build_strat.cpp +++ b/src/nfa/accel_dfa_build_strat.cpp @@ -226,16 +226,16 @@ bool has_self_loop(dstate_id_t s, const raw_dfa &raw) { } static -vector find_nonexit_symbols(const raw_dfa &rdfa, - const CharReach &escape) { - set rv; +flat_set find_nonexit_symbols(const raw_dfa &rdfa, + const CharReach &escape) { + flat_set rv; CharReach nonexit = ~escape; - for (auto i = nonexit.find_first(); i != CharReach::npos; + for (auto i = nonexit.find_first(); i != nonexit.npos; i = nonexit.find_next(i)) { rv.insert(rdfa.alpha_remap[i]); } - return vector(rv.begin(), rv.end()); + return rv; } static @@ -289,7 +289,7 @@ dstate_id_t get_sds_or_proxy(const raw_dfa &raw) { static set find_region(const raw_dfa &rdfa, dstate_id_t base, - const AccelScheme &ei) { + const AccelScheme &ei) { DEBUG_PRINTF("looking for region around %hu\n", base); set region = {base};