mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
AK: Make FlyString a little less hilariously unoptimized :^)
This commit is contained in:
@@ -118,7 +118,11 @@ bool FlyString::operator==(const StringView& string) const
|
|||||||
|
|
||||||
bool FlyString::operator==(const char* string) const
|
bool FlyString::operator==(const char* string) const
|
||||||
{
|
{
|
||||||
return String(string) == String(m_impl.ptr());
|
if (is_null())
|
||||||
|
return !string;
|
||||||
|
if (!string)
|
||||||
|
return false;
|
||||||
|
return !__builtin_strcmp(m_impl->characters(), string);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user