mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Delegate string hashing to standard library
Since standard library could have platform dependent specialized hashing functions. Also the main idea is to let `qHash` handle whatever integer type `std::hash` returns and mix it with `seed` accordingly. PR #18715.
This commit is contained in:
@@ -125,7 +125,7 @@ namespace std
|
||||
{
|
||||
uint qHash(const std::string &key, uint seed = 0)
|
||||
{
|
||||
return qHash(QByteArray::fromRawData(key.data(), static_cast<int>(key.length())), seed);
|
||||
return ::qHash(std::hash<std::string> {}(key), seed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user