|
|
@@ -177,7 +177,7 @@ class basic_observer {
|
|
|
struct matcher_handler<matcher<type_list<Reject...>, type_list<Require...>, AnyOf>> {
|
|
|
template<std::size_t Index>
|
|
|
static void maybe_valid_if(basic_observer &obs, const basic_registry<Entity> ®, const Entity entt) {
|
|
|
- if(reg.template has<Require...>(entt) && !(reg.template has<Reject>(entt) || ...)) {
|
|
|
+ if(reg.template has<Require...>(entt) && !reg.template any<Reject...>(entt)) {
|
|
|
if(auto *comp = obs.view.try_get(entt); !comp) {
|
|
|
obs.view.construct(entt);
|
|
|
}
|
|
|
@@ -213,7 +213,7 @@ class basic_observer {
|
|
|
struct matcher_handler<matcher<type_list<Reject...>, type_list<Require...>, type_list<NoneOf...>, AllOf...>> {
|
|
|
template<std::size_t Index>
|
|
|
static void maybe_valid_if(basic_observer &obs, const basic_registry<Entity> ®, const Entity entt) {
|
|
|
- if(reg.template has<AllOf..., Require...>(entt) && !(reg.template has<NoneOf>(entt) || ...) && !(reg.template has<Reject>(entt) || ...)) {
|
|
|
+ if(reg.template has<AllOf..., Require...>(entt) && !reg.template any<NoneOf..., Reject...>(entt)) {
|
|
|
if(auto *comp = obs.view.try_get(entt); !comp) {
|
|
|
obs.view.construct(entt);
|
|
|
}
|