From fff7733cdbb2ecb248926302315e489dcc805185 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Tue, 25 Aug 2026 22:56:09 +0200 Subject: [PATCH] uuid hash consolidation --- .../Sources/System/Include/System/UUID/UUID.hpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Bigfoot/Sources/System/Include/System/UUID/UUID.hpp b/Bigfoot/Sources/System/Include/System/UUID/UUID.hpp index b84e225..d5851c9 100644 --- a/Bigfoot/Sources/System/Include/System/UUID/UUID.hpp +++ b/Bigfoot/Sources/System/Include/System/UUID/UUID.hpp @@ -84,8 +84,6 @@ class UUID static UUID NULL_UUID; private: - friend struct std::hash; - /** * The uuid. */ @@ -107,25 +105,14 @@ class UUID template<> struct std::hash -{ - std::size_t operator()(const Bigfoot::UUID& p_uuid) const noexcept - { - return std::hash()(p_uuid.m_uuid); - } -}; - -/****************************************************************************************/ - -template<> -struct ankerl::unordered_dense::hash { using is_avalanching = void; [[nodiscard]] - std::uint64_t operator()(const Bigfoot::UUID& p_uuid) const noexcept + std::size_t operator()(const Bigfoot::UUID& p_uuid) const noexcept { const auto bytes = p_uuid.ToBytes(); - return detail::wyhash::hash(bytes.data(), bytes.size()); + return ankerl::unordered_dense::detail::wyhash::hash(bytes.data(), bytes.size()); } };