Explorar o código

view: reuse internal functions if possible

Michele Caini %!s(int64=3) %!d(string=hai) anos
pai
achega
5762a8a086
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/entt/entity/view.hpp

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

@@ -425,8 +425,7 @@ public:
      * @return True if the view contains the given entity, false otherwise.
      */
     [[nodiscard]] bool contains(const entity_type entt) const noexcept {
-        return std::apply([entt](const auto *...curr) { return (curr->contains(entt) && ...); }, pools)
-               && std::apply([entt](const auto *...curr) { return (!curr->contains(entt) && ...); }, filter);
+        return std::apply([entt](const auto *...curr) { return (curr->contains(entt) && ...); }, pools) && !reject(entt);
     }
 
     /**