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

@@ -120,8 +120,3 @@ bool BitTorrent::operator==(const BitTorrent::InfoHash &left, const BitTorrent::
{
return (static_cast<InfoHash::WrappedType>(left) == static_cast<InfoHash::WrappedType>(right));
}
bool BitTorrent::operator!=(const BitTorrent::InfoHash &left, const BitTorrent::InfoHash &right)
{
return !(left == right);
}

View File

@@ -90,7 +90,6 @@ namespace BitTorrent
std::size_t qHash(const TorrentID &key, std::size_t seed = 0);
bool operator==(const InfoHash &left, const InfoHash &right);
bool operator!=(const InfoHash &left, const InfoHash &right);
}
Q_DECLARE_METATYPE(BitTorrent::TorrentID)

View File

@@ -135,11 +135,6 @@ namespace BitTorrent
return (left.uniqueID() == right.uniqueID());
}
bool operator!=(const Peer &left, const Peer &right)
{
return !(left == right);
}
std::size_t qHash(const Peer &key, const std::size_t seed)
{
return qHash(key.uniqueID(), seed);

View File

@@ -64,7 +64,6 @@ namespace BitTorrent
};
bool operator==(const Peer &left, const Peer &right);
bool operator!=(const Peer &left, const Peer &right);
std::size_t qHash(const Peer &key, std::size_t seed = 0);
// *Basic* Bittorrent tracker implementation