Skip to content

Commit

Permalink
Merge 22b8ab2 into 94ede1b
Browse files Browse the repository at this point in the history
  • Loading branch information
drglove committed Feb 22, 2018
2 parents 94ede1b + 22b8ab2 commit 79f722d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/entt/entity/sparse_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,11 +614,11 @@ class SparseSet<Entity, Type>: public SparseSet<Entity> {
auto to = other.end();

pos_type pos = underlying_type::size() - 1;
const auto *direct = underlying_type::data();
const auto *local = underlying_type::data();

while(pos > 0 && from != to) {
if(underlying_type::has(*from)) {
if(*from != *(direct + pos)) {
if(*from != *(local + pos)) {
auto candidate = underlying_type::get(*from);
std::swap(instances[pos], instances[candidate]);
underlying_type::swap(pos, candidate);
Expand Down

0 comments on commit 79f722d

Please sign in to comment.