Selaa lähdekoodia

avoid taking the position twice

Michele Caini 6 vuotta sitten
vanhempi
commit
e37f84a227
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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)), ...);
         }