Implement proper equal operators

This commit is contained in:
Chocobo1
2019-08-08 23:19:53 +08:00
parent d639c16f72
commit 94f7a095bb
3 changed files with 20 additions and 19 deletions

View File

@@ -52,12 +52,13 @@ namespace BitTorrent
QByteArray peerId;
int port;
bool operator!=(const Peer &other) const;
bool operator==(const Peer &other) const;
QString uid() const;
lt::entry toEntry(bool noPeerId) const;
};
bool operator==(const Peer &left, const Peer &right);
bool operator!=(const Peer &left, const Peer &right);
struct TrackerAnnounceRequest
{
QByteArray infoHash;