Explorar o código

avoid taking the position twice

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
e37f84a227
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/entt/entity/group.hpp

+ 1 - 1
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<pool_type<Other> *>(pools)), ...);
         }