diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index 6b486e42e..9f966c8ed 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -554,7 +554,7 @@ public: template 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);