Move qHash helper for libtorrent types to its own file

This commit is contained in:
Chocobo1 2020-10-22 03:07:13 +08:00
commit 71827fe4e6
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
5 changed files with 52 additions and 12 deletions

View file

@ -61,6 +61,7 @@
#include "base/utils/string.h"
#include "common.h"
#include "downloadpriority.h"
#include "ltqhash.h"
#include "ltunderlyingtype.h"
#include "peeraddress.h"
#include "peerinfo.h"
@ -71,18 +72,6 @@ const QString QB_EXT {QStringLiteral(".!qB")};
using namespace BitTorrent;
namespace libtorrent
{
namespace aux
{
template <typename T, typename Tag>
uint qHash(const strong_typedef<T, Tag> &key, const uint seed)
{
return ::qHash((std::hash<strong_typedef<T, Tag>> {})(key), seed);
}
}
}
namespace
{
std::vector<lt::download_priority_t> toLTDownloadPriorities(const QVector<DownloadPriority> &priorities)