mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
AK: Make FlyString a little less hilariously unoptimized :^)
This commit is contained in:
parent
6e5c9970bf
commit
76bb0fab2d
Notes:
sideshowbarker
2024-07-19 07:52:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/76bb0fab2d6
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue