1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibRegex: Make Matcher<>::match(Vector<>) take a reference to the vector

It was previously copying the entire vector every time, which is not a
nice thing to do. :^)
This commit is contained in:
Ali Mohammad Pur 2021-07-31 18:52:24 +04:30 committed by Ali Mohammad Pur
parent a7653e6a05
commit d5984d296f
2 changed files with 2 additions and 2 deletions

View file

@ -111,7 +111,7 @@ RegexResult Matcher<Parser>::match(RegexStringView const& view, Optional<typenam
}
template<typename Parser>
RegexResult Matcher<Parser>::match(Vector<RegexStringView> const views, Optional<typename ParserTraits<Parser>::OptionsType> regex_options) const
RegexResult Matcher<Parser>::match(Vector<RegexStringView> const& views, Optional<typename ParserTraits<Parser>::OptionsType> regex_options) const
{
// If the pattern *itself* isn't stateful, reset any changes to start_offset.
if (!((AllFlags)m_regex_options.value() & AllFlags::Internal_Stateful))