1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09:00

AK: Store data in FlyString as StringBase

Unfortunately, it is not clear to me how to split this commit into
several atomic ones.
This commit is contained in:
Dan Klishch 2023-10-28 18:58:29 -04:00 committed by Andrew Kaster
parent e7700e16ee
commit fa52f68142
Notes: sideshowbarker 2024-07-17 23:00:03 +09:00
7 changed files with 42 additions and 145 deletions

View file

@ -178,15 +178,6 @@ public:
return builder.to_string();
}
[[nodiscard]] static String fly_string_data_to_string(Badge<FlyString>, uintptr_t const&);
[[nodiscard]] static StringView fly_string_data_to_string_view(Badge<FlyString>, uintptr_t const&);
[[nodiscard]] static u32 fly_string_data_to_hash(Badge<FlyString>, uintptr_t const&);
[[nodiscard]] uintptr_t to_fly_string_data(Badge<FlyString>) const;
static void ref_fly_string_data(Badge<FlyString>, uintptr_t);
static void unref_fly_string_data(Badge<FlyString>, uintptr_t);
void did_create_fly_string(Badge<FlyString>) const;
// FIXME: Remove these once all code has been ported to String
[[nodiscard]] ByteString to_byte_string() const;
static ErrorOr<String> from_byte_string(ByteString const&);
@ -195,6 +186,8 @@ public:
static ErrorOr<String> from_byte_string(T&&) = delete;
private:
friend FlyString;
using ShortString = Detail::ShortString;
explicit constexpr String(StringBase&& base)