From e37f84a227e4d1ddadeff1deef2c95ff591b9fce Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 2 Sep 2019 16:23:11 +0200 Subject: [PATCH] avoid taking the position twice --- src/entt/entity/group.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index 8514e8339..3fccc6973 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -843,7 +843,7 @@ public: const auto pos = cpool->index(curr); if(pos != next) { - cpool->swap(next, cpool->index(curr)); + cpool->swap(next, pos); } }(std::get *>(pools)), ...); }