From e7f7f0f69850e6362a4368a7bf47d47b4ea1772f Mon Sep 17 00:00:00 2001 From: EntireTwix Date: Fri, 2 Jul 2021 00:04:05 -0700 Subject: [PATCH] :art: changed uint64_t -> XXH64_hash_t --- include/user.h | 6 +++--- include/xxhash_str.h | 2 +- src/user.cpp | 4 ++-- src/xxhash_str.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/user.h b/include/user.h index 60beeb6..ee6fe37 100644 --- a/include/user.h +++ b/include/user.h @@ -6,16 +6,16 @@ struct User { uint32_t balance = 0; - uint64_t password; + XXH64_hash_t password; #if MAX_LOG_SIZE > 0 Log log; #endif User(std::string &&init_pass) noexcept; User(uint32_t init_bal, std::string &&init_pass) noexcept; - User(uint32_t init_bal, uint64_t init_pass) noexcept; + User(uint32_t init_bal, XXH64_hash_t init_pass) noexcept; #if MAX_LOG_SIZE > 0 - User(uint32_t init_bal, uint64_t init_pass, const Json::Value &log_j) noexcept; + User(uint32_t init_bal, XXH64_hash_t init_pass, const Json::Value &log_j) noexcept; #endif Json::Value Serialize() const; //to be removed later diff --git a/include/xxhash_str.h b/include/xxhash_str.h index ee28675..61ec6bc 100644 --- a/include/xxhash_str.h +++ b/include/xxhash_str.h @@ -4,5 +4,5 @@ struct xxHashStringGen { - uint64_t operator()(const std::string &str) const noexcept; + XXH64_hash_t operator()(const std::string &str) const noexcept; }; diff --git a/src/user.cpp b/src/user.cpp index 0d0db1e..eff1b73 100644 --- a/src/user.cpp +++ b/src/user.cpp @@ -21,9 +21,9 @@ User::User(uint32_t init_bal, std::string &&init_pass) noexcept : balance(init_b * @param init_bal * @param init_pass */ -User::User(uint32_t init_bal, uint64_t init_pass) noexcept : balance(init_bal), password(init_pass) {} +User::User(uint32_t init_bal, XXH64_hash_t init_pass) noexcept : balance(init_bal), password(init_pass) {} #if MAX_LOG_SIZE > 0 -User::User(uint32_t init_bal, uint64_t init_pass, const Json::Value &log_j) noexcept : balance(init_bal), password(init_pass) +User::User(uint32_t init_bal, XXH64_hash_t init_pass, const Json::Value &log_j) noexcept : balance(init_bal), password(init_pass) { if (log_j.size()) { diff --git a/src/xxhash_str.cpp b/src/xxhash_str.cpp index 5122082..c3670bb 100644 --- a/src/xxhash_str.cpp +++ b/src/xxhash_str.cpp @@ -1,6 +1,6 @@ #include "xxhash_str.h" -uint64_t xxHashStringGen::operator()(const std::string &str) const noexcept +XXH64_hash_t xxHashStringGen::operator()(const std::string &str) const noexcept { return XXH3_64bits(str.data(), str.size()); }