Przeglądaj źródła

group: suppress shadow warning

Michele Caini 2 lat temu
rodzic
commit
df1968255b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/entt/entity/group.hpp

+ 2 - 2
src/entt/entity/group.hpp

@@ -115,14 +115,14 @@ class group_handler<owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...>> fin
     }
     }
 
 
     void push_on_construct(const entity_type entt) {
     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)) {
            && std::apply([entt](auto *...cpool) { return (!cpool->contains(entt) && ...); }, filter)) {
             swap_elements(len++, entt, std::index_sequence_for<Owned...>{});
             swap_elements(len++, entt, std::index_sequence_for<Owned...>{});
         }
         }
     }
     }
 
 
     void push_on_destroy(const entity_type entt) {
     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)) {
            && std::apply([entt](auto *...cpool) { return (0u + ... + cpool->contains(entt)) == 1u; }, filter)) {
             swap_elements(len++, entt, std::index_sequence_for<Owned...>{});
             swap_elements(len++, entt, std::index_sequence_for<Owned...>{});
         }
         }