mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LookupServer: Implement DNSName::operator==()
This commit is contained in:
parent
78459b92d5
commit
fd76e07399
Notes:
sideshowbarker
2024-07-18 18:40:54 +09:00
Author: https://github.com/bugaevc
Commit: fd76e07399
Pull-request: https://github.com/SerenityOS/serenity/pull/6848
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/alimpfard
2 changed files with 7 additions and 0 deletions
|
@ -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('.');
|
||||
|
|
|
@ -23,6 +23,8 @@ public:
|
|||
|
||||
void randomize_case();
|
||||
|
||||
bool operator==(const DNSName&) const;
|
||||
|
||||
class Traits : public AK::Traits<DNSName> {
|
||||
public:
|
||||
static unsigned hash(const DNSName& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue