Просмотр исходного кода

view: reuse internal functions if possible

Michele Caini 3 лет назад
Родитель
Сommit
5762a8a086
1 измененных файлов с 1 добавлено и 2 удалено
  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);
     }
 
     /**