From f706d8642da0ae3046642de0b72ccffb08f96798 Mon Sep 17 00:00:00 2001 From: koniksedy Date: Thu, 31 Oct 2024 14:06:59 +0100 Subject: [PATCH] replace function call with trim --- src/re2parser.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/re2parser.cc b/src/re2parser.cc index da10ffac7..03e9f2554 100644 --- a/src/re2parser.cc +++ b/src/re2parser.cc @@ -252,7 +252,7 @@ namespace { } } } - RegexParser::renumber_states(output_nfa, explicit_nfa); + *output_nfa = Nfa(explicit_nfa).trim(); } private: // private methods @@ -440,16 +440,6 @@ namespace { } } - /** - * Renumbers the states of the input_nfa to be from <0, numberOfStates> - * @param input_nfa Nfa which states should be renumbered - * @return Equivalent Nfa as input_nfa but trimmed and with states from interval <0, numberOfStates> - */ - static Nfa renumber_states(Nfa* output_nfa, Nfa &input_nfa) { - *output_nfa = Nfa(input_nfa.delta, input_nfa.initial, input_nfa.final).trim(); - return *output_nfa; - } - /** * Gets all states that are mapped to the state (i.e., states that are within epsilon transitions chain) * @param prog RE2 prog corresponding to the parsed regex