From b888b1b09f71a8b8b4a9d45c804a1f164fb65ac3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 21 Nov 2023 12:25:22 +0100 Subject: Core/Calendar: Implement different timezone support for ingame calendar Closes #8390 Closes #29427 --- src/common/Utilities/Hash.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/common/Utilities/Hash.h') diff --git a/src/common/Utilities/Hash.h b/src/common/Utilities/Hash.h index b63201bf07a..18f7442fb44 100644 --- a/src/common/Utilities/Hash.h +++ b/src/common/Utilities/Hash.h @@ -19,6 +19,7 @@ #define TrinityCore_Hash_h__ #include +#include #include namespace Trinity @@ -28,6 +29,17 @@ namespace Trinity { seed ^= std::hash()(val) + 0x9E3779B9 + (seed << 6) + (seed >> 2); } + + inline std::uint32_t HashFnv1a(std::string_view data) + { + std::uint32_t hash = 0x811C9DC5u; + for (char c : data) + { + hash ^= c; + hash *= 0x1000193u; + } + return hash; + } } //! Hash implementation for std::pair to allow using pairs in unordered_set or as key for unordered_map -- cgit v1.2.3