From 5587c4361149278341796779ff70e50b5d7a7320 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Sat, 25 Jan 2025 21:14:32 +0300 Subject: [PATCH] ECS library 32-bit fixes --- libs/ecs/include/psemek/ecs/detail/query_cache.hpp | 2 +- libs/ecs/include/psemek/ecs/detail/query_cache_container.hpp | 4 ++-- libs/ecs/include/psemek/ecs/detail/table.hpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ecs/include/psemek/ecs/detail/query_cache.hpp b/libs/ecs/include/psemek/ecs/detail/query_cache.hpp index ff67391a..f736dfdb 100644 --- a/libs/ecs/include/psemek/ecs/detail/query_cache.hpp +++ b/libs/ecs/include/psemek/ecs/detail/query_cache.hpp @@ -23,7 +23,7 @@ namespace psemek::ecs::detail std::vector with_uuids; std::vector without_uuids; - std::size_t hash; + std::uint64_t hash; std::list entries; diff --git a/libs/ecs/include/psemek/ecs/detail/query_cache_container.hpp b/libs/ecs/include/psemek/ecs/detail/query_cache_container.hpp index 66dee4e9..3fd4894c 100644 --- a/libs/ecs/include/psemek/ecs/detail/query_cache_container.hpp +++ b/libs/ecs/include/psemek/ecs/detail/query_cache_container.hpp @@ -12,12 +12,12 @@ namespace psemek::ecs::detail struct query_cache_hash { - std::size_t operator()(std::pair, util::span> const & uuids) const + std::uint64_t operator()(std::pair, util::span> const & uuids) const { return ordered_component_hash(uuids.first, uuids.second); } - std::size_t operator()(std::shared_ptr const & cache) const + std::uint64_t operator()(std::shared_ptr const & cache) const { return cache->hash; } diff --git a/libs/ecs/include/psemek/ecs/detail/table.hpp b/libs/ecs/include/psemek/ecs/detail/table.hpp index 3e227eee..ad2edf8a 100644 --- a/libs/ecs/include/psemek/ecs/detail/table.hpp +++ b/libs/ecs/include/psemek/ecs/detail/table.hpp @@ -20,7 +20,7 @@ namespace psemek::ecs::detail { table(std::vector> columns); - std::size_t hash() const + std::uint64_t hash() const { return hash_; } @@ -85,7 +85,7 @@ namespace psemek::ecs::detail std::string describe(std::uint32_t row) const; protected: - std::size_t hash_; + std::uint64_t hash_; std::vector> columns_; util::hash_set column_uuid_set_; util::hash_map component_uuid_to_column_index_;