Skip to content

Commit

Permalink
sparse_set: prepare for yet another option
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Jul 31, 2023
1 parent d017c47 commit ed64c28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/entt/entity/sparse_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,17 @@ class basic_sparse_set {
* @param last An iterator past the last element of the range of entities.
*/
virtual void pop(basic_iterator first, basic_iterator last) {
if(mode == deletion_policy::swap_and_pop) {
switch(mode) {
case deletion_policy::swap_and_pop:
for(; first != last; ++first) {
swap_and_pop(first);
}
} else {
break;
case deletion_policy::in_place:
for(; first != last; ++first) {
in_place_pop(first);
}
break;
}
}

Expand Down

0 comments on commit ed64c28

Please sign in to comment.