Browse Source

Revise qHash function

Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
1740f968df
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/bittorrent/torrenthandle.cpp

2
src/base/bittorrent/torrenthandle.cpp

@ -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…
Cancel
Save