From 3dbd5c98daceeb1a69a3fda7960da915e2d7f41e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 6 Oct 2020 17:16:39 +0200 Subject: [PATCH] AK: Use StringImpl::operator== in FlyString --- AK/FlyString.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/AK/FlyString.cpp b/AK/FlyString.cpp index 637ef9c5966..5736329fdb9 100644 --- a/AK/FlyString.cpp +++ b/AK/FlyString.cpp @@ -40,11 +40,7 @@ struct FlyStringImplTraits : public AK::Traits { { ASSERT(a); ASSERT(b); - if (a == b) - return true; - if (a->length() != b->length()) - return false; - return !__builtin_memcmp(a->characters(), b->characters(), a->length()); + return *a == *b; } };