|
|
@@ -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) {
|
|
|
- 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<Owned...>{});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
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<Owned...>{});
|
|
|
}
|