diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index ae450bcf1..65f555fb5 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -238,9 +238,12 @@ private: */ template class basic_registry { + using basic_common_type = basic_sparse_set; + using alloc_traits = std::allocator_traits; static_assert(std::is_same_v, "Invalid value type"); - using basic_common_type = basic_sparse_set; + // std::shared_ptr because of its type erased allocator which is useful here + using container_type = dense_map, identity, std::equal_to, typename alloc_traits::template rebind_alloc>>>; template using storage_for_type = typename storage_for>>::type; @@ -1565,8 +1568,7 @@ private: context vars; entity_type free_list; std::vector epool; - // std::shared_ptr because of its type erased allocator which is useful here - dense_map, identity, std::equal_to, typename alloc_traits::template rebind_alloc>>> pools; + container_type pools; std::vector> groups; };