diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 11:11:14 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 11:36:01 +0200 |
commit | eae196aa00d2760598ed700dd66b9c4a604c1d9a (patch) | |
tree | 2fcf7978b7d059f37ed3c148fe8eb91e930536bb /compat | |
parent | f96da27624cb11151808f7602259c0f40a54d27f (diff) |
actually no need for non-overloaded int_hash
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 |