mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Revise qHash function
Instead of xor and narrowing the integers ourselves, now we let qHash() from Qt do the job properly.
This commit is contained in:
parent
2b4490d8a7
commit
1740f968df
@ -82,7 +82,7 @@ namespace libtorrent
|
|||||||
template <typename T, typename Tag>
|
template <typename T, typename Tag>
|
||||||
uint qHash(const strong_typedef<T, Tag> &key, const uint seed)
|
uint qHash(const strong_typedef<T, Tag> &key, const uint seed)
|
||||||
{
|
{
|
||||||
return static_cast<uint>((std::hash<strong_typedef<T, Tag>> {})(key) ^ seed);
|
return ::qHash((std::hash<strong_typedef<T, Tag>> {})(key), seed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user