diff --git a/TODO b/TODO index dff335fa1..16492a641 100644 --- a/TODO +++ b/TODO @@ -16,7 +16,6 @@ * any-of rule for views/groups (eg entity has A and any of B/C/D) - get -> all, exclude -> none * review prepare after clone and the others have been removed -* !(has(e) || ...) -> !any(e) * review pool::remove, ::assign * WIP: diff --git a/src/entt/entity/observer.hpp b/src/entt/entity/observer.hpp index e16f42b99..5d1695ea9 100644 --- a/src/entt/entity/observer.hpp +++ b/src/entt/entity/observer.hpp @@ -177,7 +177,7 @@ class basic_observer { struct matcher_handler, type_list, AnyOf>> { template static void maybe_valid_if(basic_observer &obs, const basic_registry ®, const Entity entt) { - if(reg.template has(entt) && !(reg.template has(entt) || ...)) { + if(reg.template has(entt) && !reg.template any(entt)) { if(auto *comp = obs.view.try_get(entt); !comp) { obs.view.construct(entt); } @@ -213,7 +213,7 @@ class basic_observer { struct matcher_handler, type_list, type_list, AllOf...>> { template static void maybe_valid_if(basic_observer &obs, const basic_registry ®, const Entity entt) { - if(reg.template has(entt) && !(reg.template has(entt) || ...) && !(reg.template has(entt) || ...)) { + if(reg.template has(entt) && !reg.template any(entt)) { if(auto *comp = obs.view.try_get(entt); !comp) { obs.view.construct(entt); }