Pioneer
Loading...
Searching...
No Matches
StringHash.h
Go to the documentation of this file.
1// Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#pragma once
5
6#include "FNV1a.h"
7
8inline constexpr size_t operator""_hash(const char *str, size_t len)
9{
10 return hash_64_fnv1a(str, len);
11}
12
13inline constexpr uint32_t operator""_hash32(const char *str, size_t len)
14{
15 return hash_32_fnv1a(str, len);
16}
constexpr uint32_t hash_32_fnv1a(const char *const data, size_t len)
Definition FNV1a.h:13
constexpr uint64_t hash_64_fnv1a(const char *const data, size_t len)
Definition FNV1a.h:29