mirror of
https://github.com/Expand-sys/CCash
synced 2025-12-17 00:22:14 +11:00
🎨 changed uint64_t -> XXH64_hash_t
This commit is contained in:
parent
88a3d79f9c
commit
e7f7f0f698
4 changed files with 7 additions and 7 deletions
|
|
@ -6,16 +6,16 @@
|
||||||
struct User
|
struct User
|
||||||
{
|
{
|
||||||
uint32_t balance = 0;
|
uint32_t balance = 0;
|
||||||
uint64_t password;
|
XXH64_hash_t password;
|
||||||
#if MAX_LOG_SIZE > 0
|
#if MAX_LOG_SIZE > 0
|
||||||
Log log;
|
Log log;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
User(std::string &&init_pass) noexcept;
|
User(std::string &&init_pass) noexcept;
|
||||||
User(uint32_t init_bal, 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
|
#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
|
#endif
|
||||||
|
|
||||||
Json::Value Serialize() const; //to be removed later
|
Json::Value Serialize() const; //to be removed later
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
|
|
||||||
struct xxHashStringGen
|
struct xxHashStringGen
|
||||||
{
|
{
|
||||||
uint64_t operator()(const std::string &str) const noexcept;
|
XXH64_hash_t operator()(const std::string &str) const noexcept;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ User::User(uint32_t init_bal, std::string &&init_pass) noexcept : balance(init_b
|
||||||
* @param init_bal
|
* @param init_bal
|
||||||
* @param init_pass
|
* @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
|
#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())
|
if (log_j.size())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "xxhash_str.h"
|
#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());
|
return XXH3_64bits(str.data(), str.size());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue