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:
Chocobo1 2020-01-27 03:51:58 +08:00 committed by sledgehammer999
parent 43fe5214d2
commit 21922ed3b4
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2

View file

@ -82,7 +82,7 @@ namespace libtorrent
template <typename T, typename Tag>
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);
}
}
}