summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibRegex/RegexMatch.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-11 00:55:02 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-11 01:27:46 +0100
commit8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch)
treeca64ba25aa735d25013d76c6d83570496c742014 /Userland/Libraries/LibRegex/RegexMatch.h
parentad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff)
downloadserenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Libraries/LibRegex/RegexMatch.h')
-rw-r--r--Userland/Libraries/LibRegex/RegexMatch.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibRegex/RegexMatch.h b/Userland/Libraries/LibRegex/RegexMatch.h
index 6d707650ee..2ebd0f5f8c 100644
--- a/Userland/Libraries/LibRegex/RegexMatch.h
+++ b/Userland/Libraries/LibRegex/RegexMatch.h
@@ -57,7 +57,7 @@ public:
explicit RegexStringView(String&&) = delete;
- StringView const& string_view() const
+ StringView string_view() const
{
return m_view.get<StringView>();
}
@@ -280,7 +280,7 @@ public:
size_t code_unit_offset_of(size_t code_point_index) const
{
return m_view.visit(
- [&](StringView const& view) -> u32 {
+ [&](StringView view) -> u32 {
Utf8View utf8_view { view };
return utf8_view.byte_offset_of(code_point_index);
},
@@ -316,7 +316,7 @@ public:
[&](StringView view) { return view == string; });
}
- bool operator==(StringView const& string) const
+ bool operator==(StringView string) const
{
return m_view.visit(
[&](Utf32View) { return to_string() == string; },
@@ -325,7 +325,7 @@ public:
[&](StringView view) { return view == string; });
}
- bool operator!=(StringView const& other) const
+ bool operator!=(StringView other) const
{
return !(*this == other);
}
@@ -374,12 +374,12 @@ public:
return !(*this == other);
}
- bool equals(RegexStringView const& other) const
+ bool equals(RegexStringView other) const
{
return other.m_view.visit([&](auto const& view) { return operator==(view); });
}
- bool equals_ignoring_case(RegexStringView const& other) const
+ bool equals_ignoring_case(RegexStringView other) const
{
// FIXME: Implement equals_ignoring_case() for unicode.
return m_view.visit(
@@ -396,7 +396,7 @@ public:
[](auto&) -> bool { TODO(); });
}
- bool starts_with(StringView const& str) const
+ bool starts_with(StringView str) const
{
return m_view.visit(
[&](Utf32View) -> bool {
@@ -536,7 +536,7 @@ using regex::RegexStringView;
template<>
struct AK::Formatter<regex::RegexStringView> : Formatter<StringView> {
- void format(FormatBuilder& builder, regex::RegexStringView const& value)
+ void format(FormatBuilder& builder, regex::RegexStringView value)
{
auto string = value.to_string();
return Formatter<StringView>::format(builder, string);