Skip to content

Commit

Permalink
LookupServer: Make DNSName::operator== ignore case
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWipfli authored and alimpfard committed Jun 9, 2021
1 parent 95d4d36 commit 12feb79
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions Userland/Services/LookupServer/DNSName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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('.');
Expand Down
2 changes: 1 addition & 1 deletion Userland/Services/LookupServer/DNSName.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DNSName {

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:
Expand Down

0 comments on commit 12feb79

Please sign in to comment.