mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
AK: Implement a flyweight string for Utf16String
Utf16FlyString more or less works exactly the same as FlyString. It will store the raw encoded data of the string instance. If the string is a short ASCII string, Utf16FlyString holds the ShortString bytes; else, Utf16FlyString holds a pointer to the Utf16StringData.
This commit is contained in:
parent
2803d66d87
commit
7f069efbc4
Notes:
github-actions[bot]
2025-07-18 16:47:19 +00:00
Author: https://github.com/trflynn89
Commit: 7f069efbc4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5388
Reviewed-by: https://github.com/shannonbooth ✅
9 changed files with 423 additions and 4 deletions
|
@ -70,15 +70,15 @@ public:
|
|||
static Utf16String from_utf32(Utf32View const&);
|
||||
|
||||
template<typename T>
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String>)
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String, Utf16FlyString>)
|
||||
static Utf16String from_utf16(T&&) = delete;
|
||||
|
||||
template<typename T>
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String>)
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String, Utf16FlyString>)
|
||||
static ErrorOr<Utf16String> try_from_utf16(T&&) = delete;
|
||||
|
||||
template<typename T>
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String>)
|
||||
requires(IsOneOf<RemoveCVReference<T>, Utf16String, Utf16FlyString>)
|
||||
static Utf16String from_utf16_without_validation(T&&) = delete;
|
||||
|
||||
template<typename... Parameters>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue