Browse Source

minor changes

Michele Caini 6 years ago
parent
commit
49a52140b0
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/entt/entity/group.hpp

+ 1 - 3
src/entt/entity/group.hpp

@@ -840,9 +840,7 @@ public:
 
 
         for(auto next = *length; next; --next) {
         for(auto next = *length; next; --next) {
             ([next = next-1, curr = cpool->data()[next-1]](auto *cpool) {
             ([next = next-1, curr = cpool->data()[next-1]](auto *cpool) {
-                const auto pos = cpool->index(curr);
-
-                if(pos != next) {
+                if(const auto pos = cpool->index(curr); pos != next) {
                     cpool->swap(next, pos);
                     cpool->swap(next, pos);
                 }
                 }
             }(std::get<pool_type<Other> *>(pools)), ...);
             }(std::get<pool_type<Other> *>(pools)), ...);