diff --git a/TODO b/TODO index b2d6b3962..845e5c7a4 100644 --- a/TODO +++ b/TODO @@ -34,7 +34,8 @@ TODO: * review cmake warning about FetchContent_Populate (need .28 and EXCLUDE_FROM_ALL for FetchContent) * after removing meta prop vectors, copy meta objects in their handles directly * suppress -Wself-move on CI with g++13 -* view and view iterator specializations for multi, single and filtered elements +* view specializations for multi, single and filtered elements +* view iterator specialization for single non-in-place storage (exclude only, no tombstone check required) * organizer support to groups * meta range: move id to meta objects and return plain types (?), then remove id from meta base and meta ctor too * refine the storage fallback mechanism for views (ie alloc?) diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index 1f212fb47..436cc58c8 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -95,10 +95,7 @@ class view_iterator final { pools{value}, filter{excl}, index{idx} { - if constexpr(storage_view_iterator) { - ENTT_ASSERT((pools[0u] == nullptr) || pools[0u]->policy() == deletion_policy::in_place, "Non in-place storage view iterator"); - } - + ENTT_ASSERT(!storage_view_iterator || pools[0u]->policy() == deletion_policy::in_place, "Non in-place storage view iterator"); seek_next(); } @@ -852,8 +849,7 @@ class basic_storage_view { const auto it = leading ? leading->find(entt) : iterator{}; return leading && (static_cast(it.index()) < leading->free_list()) ? it : iterator{}; } else { - const auto it = leading ? leading->find(entt) : typename common_type::iterator{}; - return iterator{it, {leading}, {}, 0u}; + return leading ? iterator{leading->find(entt), {leading}, {}, 0u} : iterator{}; } }