mirror of https://github.com/AxioDL/metaforce.git
hecl/hecl: Make hash constructors explicit where applicable
This commit is contained in:
parent
06548409f8
commit
9ec19d99cd
|
@ -413,9 +413,9 @@ public:
|
|||
constexpr Hash(const Hash&) = default;
|
||||
constexpr Hash(Hash&&) noexcept = default;
|
||||
constexpr Hash(uint64_t hashin) : hash(hashin) {}
|
||||
Hash(const void* buf, size_t len) : hash(XXH64((uint8_t*)buf, len, 0)) {}
|
||||
Hash(std::string_view str) : hash(XXH64((uint8_t*)str.data(), str.size(), 0)) {}
|
||||
Hash(std::wstring_view str) : hash(XXH64((uint8_t*)str.data(), str.size() * 2, 0)) {}
|
||||
explicit Hash(const void* buf, size_t len) : hash(XXH64((uint8_t*)buf, len, 0)) {}
|
||||
explicit Hash(std::string_view str) : hash(XXH64((uint8_t*)str.data(), str.size(), 0)) {}
|
||||
explicit Hash(std::wstring_view str) : hash(XXH64((uint8_t*)str.data(), str.size() * 2, 0)) {}
|
||||
|
||||
constexpr uint32_t val32() const { return uint32_t(hash) ^ uint32_t(hash >> 32); }
|
||||
constexpr uint64_t val64() const { return uint64_t(hash); }
|
||||
|
|
Loading…
Reference in New Issue