summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibRegex
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2023-01-06 11:00:24 -0500
committerLinus Groh <mail@linusgroh.de>2023-01-08 12:13:15 +0100
commit425c168dedf0138cb5d5a96c1d5cccce80afe030 (patch)
tree43f41ce3639899e4e548e3c8d114e0dacf5de7f8 /Userland/Libraries/LibRegex
parent39bda0073edb4a95d3192879157c48e094bd89af (diff)
downloadserenity-425c168dedf0138cb5d5a96c1d5cccce80afe030.zip
AK+LibJS+LibRegex: Define an alias for UTF-16 string data storage
Instead of writing out "Vector<u16, 1>" everywhere, let's have a name for it.
Diffstat (limited to 'Userland/Libraries/LibRegex')
-rw-r--r--Userland/Libraries/LibRegex/RegexByteCode.cpp2
-rw-r--r--Userland/Libraries/LibRegex/RegexMatch.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibRegex/RegexByteCode.cpp b/Userland/Libraries/LibRegex/RegexByteCode.cpp
index ede861eecb..07e22f5ae8 100644
--- a/Userland/Libraries/LibRegex/RegexByteCode.cpp
+++ b/Userland/Libraries/LibRegex/RegexByteCode.cpp
@@ -517,7 +517,7 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M
return ExecutionResult::Failed_ExecuteLowPrioForks;
Optional<DeprecatedString> str;
- Vector<u16, 1> utf16;
+ Utf16Data utf16;
Vector<u32> data;
data.ensure_capacity(length);
for (size_t i = offset; i < offset + length; ++i)
diff --git a/Userland/Libraries/LibRegex/RegexMatch.h b/Userland/Libraries/LibRegex/RegexMatch.h
index 619fdd3c84..4f36cf6fb7 100644
--- a/Userland/Libraries/LibRegex/RegexMatch.h
+++ b/Userland/Libraries/LibRegex/RegexMatch.h
@@ -266,7 +266,7 @@ public:
return view;
}
- RegexStringView construct_as_same(Span<u32> data, Optional<DeprecatedString>& optional_string_storage, Vector<u16, 1>& optional_utf16_storage) const
+ RegexStringView construct_as_same(Span<u32> data, Optional<DeprecatedString>& optional_string_storage, Utf16Data& optional_utf16_storage) const
{
auto view = m_view.visit(
[&]<typename T>(T const&) {