Explorar el Código

view: use ::index when picking the right ::each

Michele Caini hace 2 años
padre
commit
48c3f58462
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entt/entity/view.hpp

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

@@ -422,7 +422,7 @@ class basic_view<get_t<Get...>, exclude_t<Exclude...>>: public basic_common_view
 
     template<typename Func, std::size_t... Index>
     void pick_and_each(Func &func, std::index_sequence<Index...> seq) const {
-        ((storage<Index>() == base_type::handle() ? each<Index>(func, seq) : void()), ...);
+        ((Index == this->index ? each<Index>(func, seq) : void()), ...);
     }
 
 public: