registry: avoid using scoped iterators when destroying

This commit is contained in:
Michele Caini
2024-03-22 08:24:45 +01:00
parent c8a5812cea
commit bb57d94185

View File

@@ -554,7 +554,7 @@ public:
template<typename It>
void destroy(It first, It last) {
const auto to = entities.sort_as(first, last);
const auto from = entities.cbegin(0);
const auto from = entities.cend() - entities.free_list();
for(auto &&curr: pools) {
curr.second->remove(from, to);