From df1968255bbb54923292cfc9b05a14f283be920a Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Wed, 7 Feb 2024 09:23:17 +0100 Subject: [PATCH] group: suppress shadow warning --- src/entt/entity/group.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index af5f0c8c3..4e756dde2 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -115,14 +115,14 @@ class group_handler, get_t, exclude_t> fin } void push_on_construct(const entity_type entt) { - if(std::apply([entt, len = len](auto *cpool, auto *...other) { return cpool->contains(entt) && !(cpool->index(entt) < len) && (other->contains(entt) && ...); }, pools) + if(std::apply([this, entt](auto *cpool, auto *...other) { return cpool->contains(entt) && !(cpool->index(entt) < this->len) && (other->contains(entt) && ...); }, pools) && std::apply([entt](auto *...cpool) { return (!cpool->contains(entt) && ...); }, filter)) { swap_elements(len++, entt, std::index_sequence_for{}); } } void push_on_destroy(const entity_type entt) { - if(std::apply([entt, len = len](auto *cpool, auto *...other) { return cpool->contains(entt) && !(cpool->index(entt) < len) && (other->contains(entt) && ...); }, pools) + if(std::apply([this, entt](auto *cpool, auto *...other) { return cpool->contains(entt) && !(cpool->index(entt) < this->len) && (other->contains(entt) && ...); }, pools) && std::apply([entt](auto *...cpool) { return (0u + ... + cpool->contains(entt)) == 1u; }, filter)) { swap_elements(len++, entt, std::index_sequence_for{}); }