1
0
Эх сурвалжийг харах

registry: suppress a wrong warning from gcc 7.5

Michele Caini 5 жил өмнө
parent
commit
7e7d5bbf17

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

@@ -776,7 +776,7 @@ public:
     template<typename... Component>
     template<typename... Component>
     [[nodiscard]] bool any_of(const entity_type entity) const {
     [[nodiscard]] bool any_of(const entity_type entity) const {
         ENTT_ASSERT(valid(entity));
         ENTT_ASSERT(valid(entity));
-        return [entity](const auto *... cpool) { return ((cpool && cpool->contains(entity)) || ...); }(pool_if_exists<Component>()...);
+        return [entity](const auto *... cpool) { return !((!cpool || !cpool->contains(entity)) && ...); }(pool_if_exists<Component>()...);
     }
     }
 
 
     /**
     /**