Просмотр исходного кода

slightly faster sparse_set::arrange (apply permutation in O(N) now)

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

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

@@ -578,7 +578,7 @@ public:
                 auto [page, offset] = map(direct[curr]);
 
                 apply(direct[curr], direct[next]);
-                reverse[page][offset] = entity_type(pos);
+                reverse[page][offset] = entity_type(curr);
 
                 curr = next;
                 next = index(direct[curr]);