Merge pull request #19349 from Chocobo1/c++20

Use default operators generated/synthesized by compiler
This commit is contained in:
Chocobo1
2023-07-23 12:54:44 +08:00
committed by GitHub
19 changed files with 51 additions and 116 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)
{