From 898dc2a12289708b7d11fa3db4664c58dca229e4 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 5 Jun 2024 09:03:51 +0200 Subject: [PATCH] registry: minor changes --- src/entt/entity/registry.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 9abef596e..f92c23708 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -248,10 +248,10 @@ class basic_registry { ENTT_ASSERT(id == type_hash::value(), "User entity storage not allowed"); return entities; } else { + using storage_type = storage_for_type; auto &cpool = pools[id]; if(!cpool) { - using storage_type = storage_for_type; using alloc_type = typename storage_type::allocator_type; if constexpr(std::is_void_v && !std::is_constructible_v) { @@ -265,7 +265,7 @@ class basic_registry { } ENTT_ASSERT(cpool->type() == type_id(), "Unexpected type"); - return static_cast &>(*cpool); + return static_cast(*cpool); } }