Browse Source

group: decouple ::owned and owned types

Michele Caini 1 year ago
parent
commit
35d048304f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/entt/entity/group.hpp

+ 3 - 1
src/entt/entity/group.hpp

@@ -153,7 +153,9 @@ public:
         size_type cnt = 0u;
 
         for(auto pos = 0u; pos < length; ++pos) {
-            cnt += ((elem[pos] == entt::type_hash<typename Owned::element_type>::value()) || ...);
+            for(auto next = 0u; next < sizeof...(Owned); ++next) {
+                cnt += (elem[pos] == pools[next]->type().hash());
+            }
         }
 
         return cnt;