diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/int-hash.cpp | 6 | ||||
-rw-r--r-- | compat/int-hash.hpp | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/compat/int-hash.cpp b/compat/int-hash.cpp index ae2e6729..00f2e474 100644 --- a/compat/int-hash.cpp +++ b/compat/int-hash.cpp @@ -3,7 +3,7 @@ namespace floormat { -size_t int_hash32(uint32_t x) noexcept +size_t int_hash(uint32_t x) noexcept { if constexpr(sizeof(size_t) == 4) { @@ -18,10 +18,10 @@ size_t int_hash32(uint32_t x) noexcept return x; } else - return int_hash64(x); + return int_hash(uint64_t(x)); } -size_t int_hash64(uint64_t x) noexcept +size_t int_hash(uint64_t x) noexcept { // NASAM by Pelle Evensen <https://mostlymangling.blogspot.com/2020/01/nasam-not-another-strange-acronym-mixer.html> diff --git a/compat/int-hash.hpp b/compat/int-hash.hpp index e5cfc67a..2266bb4d 100644 --- a/compat/int-hash.hpp +++ b/compat/int-hash.hpp @@ -2,10 +2,7 @@ namespace floormat { -size_t int_hash32(uint32_t x) noexcept; -size_t int_hash64(uint64_t x) noexcept; - -inline size_t int_hash(uint32_t x) noexcept { return int_hash32(x); } -inline size_t int_hash(uint64_t x) noexcept { return int_hash64(x); } +size_t int_hash(uint32_t x) noexcept; +size_t int_hash(uint64_t x) noexcept; } // namespace floormat |