1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:57:45 +00:00

AK: Make FlyString::hash() use the cached hash in StringData if possible

This avoids rehashing the string every time.
This commit is contained in:
Andreas Kling 2023-03-08 23:11:59 +01:00
parent e6fc7b3ff7
commit d517e7fb3a
3 changed files with 15 additions and 2 deletions

View file

@ -213,6 +213,7 @@ public:
[[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);