Explorar el Código

sparse_set: clear policy_to_head

Michele Caini hace 2 años
padre
commit
b6bb7c1a84
Se han modificado 1 ficheros con 1 adiciones y 7 borrados
  1. 1 7
      src/entt/entity/sparse_set.hpp

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

@@ -218,13 +218,7 @@ class basic_sparse_set {
     }
     }
 
 
     underlying_type policy_to_head() {
     underlying_type policy_to_head() {
-        switch(mode) {
-        case deletion_policy::swap_and_pop:
-        case deletion_policy::in_place:
-            return traits_type::entity_mask;
-        case deletion_policy::swap_only:
-            return underlying_type{};
-        }
+        return traits_type::entity_mask * (mode != deletion_policy::swap_only);
     }
     }
 
 
 private:
 private: