minor changes

This commit is contained in:
Michele Caini
2019-09-23 23:16:29 +02:00
parent 7e0ea176cf
commit f3aed46c94
2 changed files with 4 additions and 5 deletions

2
TODO
View File

@@ -28,8 +28,8 @@ TODO
- assign<T...>(first, last)
* use unordered_map for named pools and context variables:
- use direct access (pool-like) also for context variables
- allow for key/value variables where the key is an ENTT_ID_TYPE
- improves multi-stomp
* improve registry::alive
* multi component registry::remove and some others?
* range based registry::remove and some others?
* nested groups: AB/ABC/ABCD/... (hints: sort, check functions)

View File

@@ -373,15 +373,14 @@ public:
* @return Number of entities still in use.
*/
size_type alive() const ENTT_NOEXCEPT {
auto sz = entities.size();
auto curr = destroyed;
size_type cnt{};
while(curr != null) {
for(; curr != null; --sz) {
curr = entities[to_integer(curr) & traits_type::entity_mask];
++cnt;
}
return entities.size() - cnt;
return sz;
}
/**