From 2695d48ba736b8a0898442a7b57fc9ec855cfec0 Mon Sep 17 00:00:00 2001 From: Corentin Schreiber Date: Tue, 19 Apr 2022 09:58:17 +0100 Subject: [PATCH] registry: overflow of version and max number of entities (#864) --- AUTHORS | 1 + TODO | 1 + src/entt/entity/registry.hpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index f3d655bd4..b49cf2f84 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,6 +11,7 @@ ceeac ColinH corystegel Croydon +cschreib cugone dbacchet dBagrat diff --git a/TODO b/TODO index 4b913caba..5c8fbc877 100644 --- a/TODO +++ b/TODO @@ -17,6 +17,7 @@ WIP: * custom allocators all over * remove storage::patch * consider removing ENTT_NOEXCEPT, use ENTT_NOEXCEPT_IF (or noexcept(...)) as appropriate in any case (ie make compressed_pair conditionally noexcept) +* add test for maximum number of entities reached WIP: * add user data to type_info diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index c743088d1..b7d773a91 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -302,7 +302,7 @@ class basic_registry { } auto generate_identifier(const std::size_t pos) ENTT_NOEXCEPT { - ENTT_ASSERT(pos < entity_traits::to_integral(null), "No entities available"); + ENTT_ASSERT(pos < entity_traits::to_entity(null), "No entities available"); return entity_traits::combine(static_cast(pos), {}); }