Browse Source

sparse_set: avoid using free_list internally, prepare to drop scoped iterators

Michele Caini 2 years ago
parent
commit
f481bc307f
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

@@ -228,7 +228,7 @@ private:
     }
 
     virtual void swap_or_move([[maybe_unused]] const std::size_t lhs, [[maybe_unused]] const std::size_t rhs) {
-        ENTT_ASSERT((mode != deletion_policy::swap_only) || (((lhs < free_list()) + (rhs < free_list())) != 1u), "Cross swapping is not supported");
+        ENTT_ASSERT((mode != deletion_policy::swap_only) || (((lhs < static_cast<const std::size_t>(head)) + (rhs < static_cast<const std::size_t>(head))) != 1u), "Cross swapping is not supported");
     }
 
 protected: