Skip to content
Snippets Groups Projects
Commit beff2fec authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

fix hash function name

parent 97d7c330
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ namespace fggl::util { ...@@ -31,7 +31,7 @@ namespace fggl::util {
constexpr uint64_t FNV_PRIME_64 = 0x00000100000001B3; constexpr uint64_t FNV_PRIME_64 = 0x00000100000001B3;
constexpr uint64_t FNV_OFFSET_BASIS_64 = 0xcbf29ce484222325; constexpr uint64_t FNV_OFFSET_BASIS_64 = 0xcbf29ce484222325;
constexpr uint32_t hash_fnv0a_32(const char* str) { constexpr uint32_t hash_fnv1a_32(const char* str) {
uint32_t hash = FNV_OFFSET_BASIS_32; uint32_t hash = FNV_OFFSET_BASIS_32;
for (int i = 0; str[i] != '\0'; i++) { for (int i = 0; str[i] != '\0'; i++) {
hash = hash ^ str[i]; hash = hash ^ str[i];
...@@ -40,7 +40,7 @@ namespace fggl::util { ...@@ -40,7 +40,7 @@ namespace fggl::util {
return hash; return hash;
} }
constexpr uint64_t hash_fnv0a_64(const char* str) { constexpr uint64_t hash_fnv1a_64(const char* str) {
uint64_t hash = FNV_OFFSET_BASIS_64; uint64_t hash = FNV_OFFSET_BASIS_64;
for (int i = 0; str[i] != '\0'; i++) { for (int i = 0; str[i] != '\0'; i++) {
hash = hash ^ str[i]; hash = hash ^ str[i];
...@@ -50,7 +50,7 @@ namespace fggl::util { ...@@ -50,7 +50,7 @@ namespace fggl::util {
} }
constexpr GUID make_guid(const char* str) { constexpr GUID make_guid(const char* str) {
return GUID::make(hash_fnv0a_64(str)); return GUID::make(hash_fnv1a_64(str));
} }
constexpr GUID operator ""_fid(const char* str) { constexpr GUID operator ""_fid(const char* str) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment