diff --git a/Userland/Services/LookupServer/DNSName.cpp b/Userland/Services/LookupServer/DNSName.cpp index c50406b024..cb753f6ddb 100644 --- a/Userland/Services/LookupServer/DNSName.cpp +++ b/Userland/Services/LookupServer/DNSName.cpp @@ -74,6 +74,11 @@ 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 425d6bcb46..6c6e881d90 100644 --- a/Userland/Services/LookupServer/DNSName.h +++ b/Userland/Services/LookupServer/DNSName.h @@ -23,6 +23,8 @@ public: void randomize_case(); + bool operator==(const DNSName&) const; + class Traits : public AK::Traits { public: static unsigned hash(const DNSName& name);