From 76bb0fab2d6a45962a5fdc2ba54e6c5c6e1c630c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 5 Apr 2020 19:11:39 +0200 Subject: AK: Make FlyString a little less hilariously unoptimized :^) --- AK/FlyString.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'AK') diff --git a/AK/FlyString.cpp b/AK/FlyString.cpp index 36f5c8a241..c537ac14e6 100644 --- a/AK/FlyString.cpp +++ b/AK/FlyString.cpp @@ -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); } } -- cgit v1.2.3