Michele Caini 1 год назад
Родитель
Сommit
b834148a76
2 измененных файлов с 1 добавлено и 2 удалено
  1. 0 1
      TODO
  2. 1 1
      src/entt/entity/view.hpp

+ 0 - 1
TODO

@@ -27,7 +27,6 @@ TODO:
 * storage entity: no emplace/insert, rename and add a fast range-push from above
 * table: pop back to support swap and pop, single column access, empty type optimization
 * checkout tools workflow
-* improve front (no multiple checks) and back (ie no contains) for multi-type view
 * cleanup common view from tricks to handle single swap-only and in-place, if constexpr branches
 * entity based component_traits
 * review cmake warning about FetchContent_Populate (need .28 and EXCLUDE_FROM_ALL for FetchContent)

+ 1 - 1
src/entt/entity/view.hpp

@@ -368,7 +368,7 @@ public:
         if(index != Get) {
             auto it = pools[index]->rbegin();
             const auto last = it + static_cast<typename iterator::difference_type>(offset());
-            for(; it != last && !contains(*it); ++it) {}
+            for(; it != last && !(internal::all_of(pools.begin(), pools.begin() + index, *it) && internal::all_of(pools.begin() + index + 1, pools.end(), *it) && internal::none_of(filter.begin(), filter.end(), *it)); ++it) {}
             return it == last ? null : *it;
         }