Use the correct type when referring to info hash

This commit is contained in:
Chocobo1
2020-11-30 14:39:03 +08:00
parent 3485ad39d9
commit 9f0429ca6f
12 changed files with 152 additions and 160 deletions

View File

@@ -35,11 +35,6 @@ using namespace BitTorrent;
const int InfoHashTypeId = qRegisterMetaType<InfoHash>();
InfoHash::InfoHash()
: m_valid(false)
{
}
InfoHash::InfoHash(const lt::sha1_hash &nativeHash)
: m_valid(true)
, m_nativeHash(nativeHash)

View File

@@ -38,7 +38,7 @@ namespace BitTorrent
class InfoHash
{
public:
InfoHash();
InfoHash() = default;
InfoHash(const lt::sha1_hash &nativeHash);
InfoHash(const QString &hashString);
InfoHash(const InfoHash &other) = default;
@@ -54,7 +54,7 @@ namespace BitTorrent
operator QString() const;
private:
bool m_valid;
bool m_valid = false;
lt::sha1_hash m_nativeHash;
QString m_hashString;
};