diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-06-07 14:41:20 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-06-09 17:43:32 +0430 |
commit | 12feb79cef6a08173ab6419e913bf75f99d5edbf (patch) | |
tree | 4c24d61fdcff9fa1434c49d07be0faed61c6fc99 | |
parent | 95d4d36b5c44b2e58da57b0c662a9347db402ef3 (diff) | |
download | serenity-12feb79cef6a08173ab6419e913bf75f99d5edbf.zip |
LookupServer: Make DNSName::operator== ignore case
-rw-r--r-- | Userland/Services/LookupServer/DNSName.cpp | 5 | ||||
-rw-r--r-- | Userland/Services/LookupServer/DNSName.h | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/Userland/Services/LookupServer/DNSName.cpp b/Userland/Services/LookupServer/DNSName.cpp index b4f13c6c52..fde5575bca 100644 --- a/Userland/Services/LookupServer/DNSName.cpp +++ b/Userland/Services/LookupServer/DNSName.cpp @@ -75,11 +75,6 @@ void DNSName::randomize_case() m_name = builder.to_string(); } -bool DNSName::operator==(const DNSName& other) const -{ - return as_string() == other.as_string(); -} - OutputStream& operator<<(OutputStream& stream, const DNSName& name) { auto parts = name.as_string().split_view('.'); diff --git a/Userland/Services/LookupServer/DNSName.h b/Userland/Services/LookupServer/DNSName.h index 6c6e881d90..17fbe7a557 100644 --- a/Userland/Services/LookupServer/DNSName.h +++ b/Userland/Services/LookupServer/DNSName.h @@ -23,7 +23,7 @@ public: void randomize_case(); - bool operator==(const DNSName&) const; + bool operator==(const DNSName& other) const { return Traits::equals(*this, other); } class Traits : public AK::Traits<DNSName> { public: |