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

+ 0 - 2
TODO

@@ -28,8 +28,6 @@ TODO:
 * view: propagate tombostone check request to iterator
 * view: propagate tombostone check request to iterator
 * table: pop back to support swap and pop, single column access, empty type optimization
 * table: pop back to support swap and pop, single column access, empty type optimization
 * checkout tools workflow
 * checkout tools workflow
-* review constrained noexcept-ness (ie sigh)
-* registry::view const invokes refresh multiple times implicitly
 * improve front (no multiple checks) and back (ie no contains) for multi-type view
 * 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
 * cleanup common view from tricks to handle single swap-only and in-place, if constexpr branches
 * entity based component_traits
 * entity based component_traits

+ 1 - 2
src/entt/entity/registry.hpp

@@ -1067,9 +1067,8 @@ public:
     template<typename Type, typename... Other, typename... Exclude>
     template<typename Type, typename... Other, typename... Exclude>
     [[nodiscard]] basic_view<get_t<storage_for_type<const Type>, storage_for_type<const Other>...>, exclude_t<storage_for_type<const Exclude>...>>
     [[nodiscard]] basic_view<get_t<storage_for_type<const Type>, storage_for_type<const Other>...>, exclude_t<storage_for_type<const Exclude>...>>
     view(exclude_t<Exclude...> = exclude_t{}) const {
     view(exclude_t<Exclude...> = exclude_t{}) const {
-        const auto cpools = std::make_tuple(assure<std::remove_const_t<Type>>(), assure<std::remove_const_t<Other>>()..., assure<std::remove_const_t<Exclude>>()...);
         basic_view<get_t<storage_for_type<const Type>, storage_for_type<const Other>...>, exclude_t<storage_for_type<const Exclude>...>> elem{};
         basic_view<get_t<storage_for_type<const Type>, storage_for_type<const Other>...>, exclude_t<storage_for_type<const Exclude>...>> elem{};
-        std::apply([&elem](const auto *...curr) { ((curr ? elem.storage(*curr) : void()), ...); }, cpools);
+        [&elem](const auto *...curr) { ((curr ? elem.storage(*curr) : void()), ...); }(assure<std::remove_const_t<Exclude>>()..., assure<std::remove_const_t<Other>>()..., assure<std::remove_const_t<Type>>());
         return elem;
         return elem;
     }
     }