LibRegex: Use unchecked_empend() where possible

This commit is contained in:
Tim Ledbetter
2025-11-26 08:29:36 +00:00
committed by Tim Ledbetter
parent c1742fa989
commit 061b457bac
Notes: github-actions[bot] 2025-11-26 14:35:28 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -497,7 +497,7 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M
};
Vector<DisjunctionState, 4> disjunction_states;
disjunction_states.empend();
disjunction_states.unchecked_empend();
auto current_disjunction_state = [&]() -> DisjunctionState& { return disjunction_states.last(); };

View File

@@ -380,7 +380,7 @@ RegexResult Matcher<Parser>::match(Vector<RegexStringView> const& views, Optiona
if (flat_capture_group_matches.size() < state.capture_group_count * match_count) {
flat_capture_group_matches.ensure_capacity(match_count * state.capture_group_count);
for (size_t i = flat_capture_group_matches.size(); i < match_count * state.capture_group_count; ++i)
flat_capture_group_matches.empend();
flat_capture_group_matches.unchecked_empend();
}
Vector<Span<Match>> capture_group_matches;