2#include <entt/entt.hpp>
9 constexpr std::uint64_t
fnv1a64(
const char *str,
const std::size_t len) {
10 std::uint64_t hash = 0xcbf29ce484222325ULL;
11 for (std::size_t i = 0; i < len; ++i) {
12 hash ^=
static_cast<unsigned char>(str[i]);
13 hash *= 0x100000001b3ULL;
35 return entt::hashed_string(str).value();
A namespace for utilities of different kinds.
entt::hashed_string::hash_type StringHash32
constexpr std::uint64_t fnv1a64(const char *str, const std::size_t len)
Computes the 64bit FNV-1a string hash.