diff --git a/include/bank.h b/include/bank.h index a4ec78e..f078c73 100644 --- a/include/bank.h +++ b/include/bank.h @@ -4,7 +4,6 @@ #include #include #include -#include "xxhash_strfunctor.hpp" #include "user.h" #if CONSERVATIVE_DISK_SAVE && MAX_LOG_SIZE < 0 @@ -15,6 +14,14 @@ using BankResponse = std::pair; class Bank { + struct xxHashStringGen + { + inline uint64_t operator()(const std::string &str) const + { + return XXH3_64bits(str.data(), str.size()); + } + }; + phmap::parallel_flat_hash_map< std::string, User, xxHashStringGen, @@ -58,7 +65,6 @@ public: BankResponse AddUser(const std::string &name, std::string &&init_pass) noexcept; BankResponse AdminAddUser(std::string &&name, uint32_t init_bal, std::string &&init_pass) noexcept; - BankResponse DelUser(const std::string &name) noexcept; void Save();