diff --git a/AK/FlyString.cpp b/AK/FlyString.cpp index f8089be5701..f19f1daaa4e 100644 --- a/AK/FlyString.cpp +++ b/AK/FlyString.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -162,6 +163,11 @@ size_t FlyString::number_of_fly_strings() return all_fly_strings().size(); } +DeprecatedFlyString FlyString::to_deprecated_fly_string() const +{ + return DeprecatedFlyString(bytes_as_string_view()); +} + unsigned Traits::hash(FlyString const& fly_string) { return fly_string.bytes_as_string_view().hash(); diff --git a/AK/FlyString.h b/AK/FlyString.h index 39ff80a7308..28e6de22caf 100644 --- a/AK/FlyString.h +++ b/AK/FlyString.h @@ -51,6 +51,9 @@ public: // This is primarily interesting to unit tests. [[nodiscard]] static size_t number_of_fly_strings(); + // FIXME: Remove this once all code has been ported to FlyString + [[nodiscard]] DeprecatedFlyString to_deprecated_fly_string() const; + private: // This will hold either the pointer to the Detail::StringData it represents or the raw bytes of // an inlined short string.