AK: Make FlyString a little less hilariously unoptimized :^)

This commit is contained in:
Andreas Kling 2020-04-05 19:11:39 +02:00
parent 6e5c9970bf
commit 76bb0fab2d

View file

@ -118,7 +118,11 @@ bool FlyString::operator==(const StringView& 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);
}
}