Michele Caini 2 лет назад
Родитель
Сommit
40793e9485
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/entt/entity/sparse_set.hpp

+ 2 - 2
src/entt/entity/sparse_set.hpp

@@ -251,8 +251,8 @@ protected:
         if(const auto pos = static_cast<underlying_type>(index(*it)); pos < head) {
             bump(traits_type::next(*it));
 
-            if(const auto slot = head - 1u; pos != slot) {
-                swap_elements(packed[pos], packed[slot]);
+            if(const auto next = head - 1u; pos != next) {
+                swap_elements(packed[pos], packed[next]);
             }
 
             // partition check support in derived classes