AK: Add template specializations for Optional<{,Fly}String>

Slice the size of `Optional<{,Fly}String>` in half by introducing
`UINTPTR_MAX` as an invalid bit pattern for these values.
This commit is contained in:
Jonne Ransijn
2024-10-28 22:53:16 +01:00
committed by Andreas Kling
parent fcdf3014f1
commit 2457118024
8 changed files with 427 additions and 2 deletions

View File

@@ -50,6 +50,8 @@ FlyString FlyString::from_utf8_without_validation(ReadonlyBytes string)
FlyString::FlyString(String const& string)
{
ASSERT(!string.is_invalid());
if (string.is_short_string()) {
m_data = string;
return;