Ver Fonte

view: stable multi-type view ::each(cb) function

Michele Caini há 3 anos atrás
pai
commit
88a1b8d0df
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/entt/entity/view.hpp

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

@@ -534,7 +534,7 @@ public:
      */
      */
     template<typename Func>
     template<typename Func>
     void each(Func func) const {
     void each(Func func) const {
-        pick_and_each(func, std::index_sequence_for<Get...>{});
+        view ? pick_and_each(func, std::index_sequence_for<Get...>{}) : void();
     }
     }
 
 
     /**
     /**