Use default operators generated/synthesized by compiler

This commit is contained in:
Chocobo1
2022-04-02 13:34:52 +08:00
parent 10ee1ab7a2
commit 7612d5d0ef
15 changed files with 4 additions and 76 deletions

View File

@@ -67,12 +67,9 @@ struct PeerEndpoint
{
BitTorrent::PeerAddress address;
QString connectionType; // matches return type of `PeerInfo::connectionType()`
};
bool operator==(const PeerEndpoint &left, const PeerEndpoint &right)
{
return (left.address == right.address) && (left.connectionType == right.connectionType);
}
friend bool operator==(const PeerEndpoint &left, const PeerEndpoint &right) = default;
};
std::size_t qHash(const PeerEndpoint &peerEndpoint, const std::size_t seed = 0)
{