registry: overflow of version and max number of entities (#864)

This commit is contained in:
Corentin Schreiber
2022-04-19 09:58:17 +01:00
committed by Michele Caini
parent aba2a6b17d
commit 2695d48ba7
3 changed files with 3 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ ceeac
ColinH
corystegel
Croydon
cschreib
cugone
dbacchet
dBagrat

1
TODO
View File

@@ -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

View File

@@ -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<typename entity_traits::entity_type>(pos), {});
}