Sfoglia il codice sorgente

registry: suppress a wrong warning from gcc 7.5

Michele Caini 5 anni fa
parent
commit
7e7d5bbf17
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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>()...);
     }
 
     /**