Browse Source

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

Michele Caini 6 years ago
parent
commit
116825d604
1 changed files with 1 additions and 1 deletions
  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]);