From eae196aa00d2760598ed700dd66b9c4a604c1d9a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 10 Apr 2023 11:11:14 +0200 Subject: actually no need for non-overloaded int_hash --- compat/int-hash.cpp | 6 +++--- 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 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 -- cgit v1.2.3