diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index db92a13fc..4e5654ab6 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -359,7 +359,8 @@ public: * @return True if the view contains the given entity, false otherwise. */ bool contains(const entity_type entt) const { - return find(entt) != end(); + return (std::get *>(pools)->has(entt) && ...) + && (!std::get *>(pools)->has(entt) && ...); } /** @@ -688,7 +689,7 @@ public: * @return True if the view contains the given entity, false otherwise. */ bool contains(const entity_type entt) const { - return find(entt) != end(); + return pool->has(entt); } /**