storage: prevent ::next from spinning forever
This commit is contained in:
1
TODO
1
TODO
@@ -32,7 +32,6 @@ TODO:
|
||||
* range sparse_set::push should return a reverse iterator, it's kinda wrong now
|
||||
* after non-continuous generation for entity storage:
|
||||
- get/reset placeholder to position after saving/loading (avoid long lookup)
|
||||
- basic_storage<...>::next never stops in release when it runs out of entities (well, not an issue probably but still)
|
||||
- documentation for reserved entities
|
||||
* no-version entities always return true when compared to tombstones (fixed but test needed)
|
||||
* storage entity: no emplace/insert, rename and add a fast range-push from above
|
||||
|
||||
@@ -957,7 +957,7 @@ class basic_storage<Entity, Entity, Allocator>
|
||||
do {
|
||||
ENTT_ASSERT(placeholder < underlying_type::traits_type::to_entity(null), "Invalid element");
|
||||
entt = underlying_type::traits_type::combine(static_cast<typename underlying_type::traits_type::entity_type>(placeholder++), {});
|
||||
} while(base_type::current(entt) != underlying_type::traits_type::to_version(tombstone));
|
||||
} while(base_type::current(entt) != underlying_type::traits_type::to_version(tombstone) && entt != null);
|
||||
|
||||
return entt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user