mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:17:36 +00:00
LibRegex: Remove RegexStringView(char const*) constructor
This allowed passing in a nullptr for the StringView which will not be possible once StringView(char const*) is removed.
This commit is contained in:
parent
87f5e0bcda
commit
5422691f07
1 changed files with 4 additions and 7 deletions
|
@ -25,10 +25,7 @@ namespace regex {
|
||||||
|
|
||||||
class RegexStringView {
|
class RegexStringView {
|
||||||
public:
|
public:
|
||||||
RegexStringView(char const* chars)
|
RegexStringView() = default;
|
||||||
: m_view(StringView { chars })
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
RegexStringView(String const& string)
|
RegexStringView(String const& string)
|
||||||
: m_view(string.view())
|
: m_view(string.view())
|
||||||
|
@ -448,7 +445,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Variant<StringView, Utf8View, Utf16View, Utf32View> m_view;
|
Variant<StringView, Utf8View, Utf16View, Utf32View> m_view { StringView {} };
|
||||||
bool m_unicode { false };
|
bool m_unicode { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -498,7 +495,7 @@ public:
|
||||||
left_column = 0;
|
left_column = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegexStringView view { nullptr };
|
RegexStringView view {};
|
||||||
Optional<FlyString> capture_group_name {};
|
Optional<FlyString> capture_group_name {};
|
||||||
size_t line { 0 };
|
size_t line { 0 };
|
||||||
size_t column { 0 };
|
size_t column { 0 };
|
||||||
|
@ -510,7 +507,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MatchInput {
|
struct MatchInput {
|
||||||
RegexStringView view { nullptr };
|
RegexStringView view {};
|
||||||
AllOptions regex_options {};
|
AllOptions regex_options {};
|
||||||
size_t start_offset { 0 }; // For Stateful matches, saved and restored from Regex::start_offset.
|
size_t start_offset { 0 }; // For Stateful matches, saved and restored from Regex::start_offset.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue