mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
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:
committed by
Andreas Kling
parent
fcdf3014f1
commit
2457118024
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user