Explorar el Código

registry: suppress a wrong warning from gcc 7.5

Michele Caini hace 5 años
padre
commit
7e7d5bbf17
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/entt/entity/registry.hpp

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

@@ -776,7 +776,7 @@ public:
     template<typename... Component>
     [[nodiscard]] bool any_of(const entity_type entity) const {
         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>()...);
     }
 
     /**