Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
avoid unnecessary copy
  • Loading branch information
anonrig committed Jan 23, 2025
commit ed0a1b3db06dce992b9e505ba2950641fe7b12cf
3 changes: 2 additions & 1 deletion include/ada/url_pattern_helpers-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,8 @@ tl::expected<std::vector<url_pattern_part>, errors> parse_pattern_string(
template <url_pattern_regex::regex_concept regex_provider>
bool protocol_component_matches_special_scheme(
url_pattern_component<regex_provider>& component) {
auto regex = component.regexp;
// let's avoid unnecessary copy here.
auto& regex = component.regexp;
return regex_provider::regex_match("http", regex) ||
regex_provider::regex_match("https", regex) ||
regex_provider::regex_match("ws", regex) ||
Expand Down
Loading