Explorar el Código

view: reuse internal functions if possible

Michele Caini hace 3 años
padre
commit
5762a8a086
Se han modificado 1 ficheros con 1 adiciones y 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.
      * @return True if the view contains the given entity, false otherwise.
      */
      */
     [[nodiscard]] bool contains(const entity_type entt) const noexcept {
     [[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);
     }
     }
 
 
     /**
     /**