mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Add operator< for InfoHash class
This commit is contained in:
@@ -84,6 +84,11 @@ bool BitTorrent::operator!=(const InfoHash &left, const InfoHash &right)
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
bool BitTorrent::operator<(const InfoHash &left, const InfoHash &right)
|
||||
{
|
||||
return static_cast<lt::sha1_hash>(left) < static_cast<lt::sha1_hash>(right);
|
||||
}
|
||||
|
||||
uint BitTorrent::qHash(const InfoHash &key, const uint seed)
|
||||
{
|
||||
return ::qHash((std::hash<lt::sha1_hash> {})(key), seed);
|
||||
|
||||
Reference in New Issue
Block a user