From 3f8060d8590b7c48e6afadfeb6398893240877ef Mon Sep 17 00:00:00 2001 From: sin-ack Date: Mon, 11 Jul 2022 20:54:28 +0000 Subject: [PATCH] AK: Remove String <-> char const* comparison operators During the removal of StringView(char const*), all users of these functions were removed, and they are of dubious value (relying on implicit StringView conversion). --- AK/String.cpp | 20 -------------------- AK/String.h | 5 ----- 2 files changed, 25 deletions(-) diff --git a/AK/String.cpp b/AK/String.cpp index a3cadadb71..86d0be5f20 100644 --- a/AK/String.cpp +++ b/AK/String.cpp @@ -393,26 +393,6 @@ String String::invert_case() const return StringUtils::invert_case(*this); } -bool operator<(char const* characters, String const& string) -{ - return string.view() > characters; -} - -bool operator>=(char const* characters, String const& string) -{ - return string.view() <= characters; -} - -bool operator>(char const* characters, String const& string) -{ - return string.view() < characters; -} - -bool operator<=(char const* characters, String const& string) -{ - return string.view() >= characters; -} - bool String::operator==(char const* cstring) const { return view() == cstring; diff --git a/AK/String.h b/AK/String.h index 9e1262a38d..e245e5ffd4 100644 --- a/AK/String.h +++ b/AK/String.h @@ -327,11 +327,6 @@ struct CaseInsensitiveStringTraits : public Traits { static bool equals(String const& a, String const& b) { return a.equals_ignoring_case(b); } }; -bool operator<(char const*, String const&); -bool operator>=(char const*, String const&); -bool operator>(char const*, String const&); -bool operator<=(char const*, String const&); - String escape_html_entities(StringView html); InputStream& operator>>(InputStream& stream, String& string);