mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibRegex: Avoid copying MatchInput when getting argument descriptions
This commit is contained in:
committed by
Ali Mohammad Pur
parent
73fcbbb0ee
commit
464ac85a1b
Notes:
sideshowbarker
2024-07-17 04:24:14 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/464ac85a1b Pull-request: https://github.com/SerenityOS/serenity/pull/15994
@@ -927,12 +927,12 @@ Vector<CompareTypeAndValuePair> OpCode_Compare::flat_compares() const
|
||||
return result;
|
||||
}
|
||||
|
||||
Vector<String> OpCode_Compare::variable_arguments_to_string(Optional<MatchInput> input) const
|
||||
Vector<String> OpCode_Compare::variable_arguments_to_string(Optional<MatchInput const&> input) const
|
||||
{
|
||||
Vector<String> result;
|
||||
|
||||
size_t offset { state().instruction_position + 3 };
|
||||
RegexStringView view = ((input.has_value()) ? input.value().view : StringView {});
|
||||
RegexStringView const& view = ((input.has_value()) ? input.value().view : StringView {});
|
||||
|
||||
for (size_t i = 0; i < arguments_count(); ++i) {
|
||||
auto compare_type = (CharacterCompareType)m_bytecode->at(offset++);
|
||||
|
||||
Reference in New Issue
Block a user