Browse Source

avoid taking the position twice

Michele Caini 6 năm trước cách đây
mục cha
commit
e37f84a227
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)), ...);
         }