mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Use hashing helpers provided by Qt6
This commit is contained in:
@@ -79,9 +79,12 @@ bool BitTorrent::operator==(const BitTorrent::PeerAddress &left, const BitTorren
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
std::size_t BitTorrent::qHash(const BitTorrent::PeerAddress &addr, const std::size_t seed)
|
||||
{
|
||||
return qHashMulti(seed, addr.ip, addr.port);
|
||||
}
|
||||
#else
|
||||
uint BitTorrent::qHash(const BitTorrent::PeerAddress &addr, const uint seed)
|
||||
#endif
|
||||
{
|
||||
return (::qHash(addr.ip, seed) ^ ::qHash(addr.port));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user