Skip to content

Commit

Permalink
sparse set: internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Dec 10, 2024
1 parent c3b66bf commit fe5797e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/entt/entity/sparse_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,18 @@ class basic_sparse_set {
switch(mode) {
case deletion_policy::in_place:
if(head != max_size) {
for(auto first = begin(); !(first.index() < 0); ++first) {
if(*first != tombstone) {
sparse_ref(*first) = null;
for(auto &&elem: packed) {
if(elem != tombstone) {
sparse_ref(elem) = null;
}
}
break;
}
[[fallthrough]];
case deletion_policy::swap_only:
case deletion_policy::swap_and_pop:
for(auto first = begin(); !(first.index() < 0); ++first) {
sparse_ref(*first) = null;
for(auto &&elem: packed) {
sparse_ref(elem) = null;
}
break;
}
Expand Down

0 comments on commit fe5797e

Please sign in to comment.