1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

libutil: Use default operator== for ParsedURL

The default comparison operator can be generated
by the compiler since C++20.
This commit is contained in:
Sergei Zimmerman 2025-07-18 21:20:46 +03:00
parent ad449c0288
commit d020f21a2a
No known key found for this signature in database
2 changed files with 1 additions and 7 deletions

View file

@ -15,7 +15,7 @@ struct ParsedURL
std::string to_string() const;
bool operator==(const ParsedURL & other) const noexcept;
bool operator==(const ParsedURL & other) const noexcept = default;
/**
* Remove `.` and `..` path elements.

View file

@ -110,12 +110,6 @@ std::ostream & operator<<(std::ostream & os, const ParsedURL & url)
return os;
}
bool ParsedURL::operator==(const ParsedURL & other) const noexcept
{
return scheme == other.scheme && authority == other.authority && path == other.path && query == other.query
&& fragment == other.fragment;
}
ParsedURL ParsedURL::canonicalise()
{
ParsedURL res(*this);