mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-05 01:10:24 +00:00
LibRegex: Use unchecked_empend() where possible
This commit is contained in:
committed by
Tim Ledbetter
parent
c1742fa989
commit
061b457bac
Notes:
github-actions[bot]
2025-11-26 14:35:28 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/061b457bac6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6938 Reviewed-by: https://github.com/alimpfard ✅
@@ -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(); };
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user