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:
parent
e7700e16ee
commit
fa52f68142
Notes:
sideshowbarker
2024-07-17 23:00:03 +09:00
Author: https://github.com/DanShaders
Commit: fa52f68142
Pull-request: https://github.com/SerenityOS/serenity/pull/21661
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/kleinesfilmroellchen
Reviewed-by: https://github.com/trflynn89
7 changed files with 42 additions and 145 deletions
11
AK/String.h
11
AK/String.h
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue