From 7f8d69ee2fc8a4dfb1f8b5e6415bf8e4624ded97 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Sat, 28 Oct 2023 02:10:46 -0400 Subject: [PATCH] AK: Remove explicit String::operator!= in favor of defaulted one --- AK/String.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/AK/String.h b/AK/String.h index 756a0e620b..4d2a634b53 100644 --- a/AK/String.h +++ b/AK/String.h @@ -151,16 +151,9 @@ public: Optional find_byte_offset(StringView substring, size_t from_byte_offset = 0) const; [[nodiscard]] bool operator==(String const&) const; - [[nodiscard]] bool operator!=(String const& other) const { return !(*this == other); } - [[nodiscard]] bool operator==(FlyString const&) const; - [[nodiscard]] bool operator!=(FlyString const& other) const { return !(*this == other); } - [[nodiscard]] bool operator==(StringView) const; - [[nodiscard]] bool operator!=(StringView other) const { return !(*this == other); } - [[nodiscard]] bool operator==(char const* cstring) const; - [[nodiscard]] bool operator!=(char const* cstring) const { return !(*this == cstring); } // NOTE: UTF-8 is defined in a way that lexicographic ordering of code points is equivalent to lexicographic ordering of bytes. [[nodiscard]] int operator<=>(String const& other) const { return this->bytes_as_string_view().compare(other.bytes_as_string_view()); }