|
|
@@ -240,15 +240,6 @@ protected:
|
|
|
/*! @brief Random access iterator type. */
|
|
|
using basic_iterator = internal::sparse_set_iterator<packed_container_type>;
|
|
|
|
|
|
- /**
|
|
|
- * @brief Temporary function to make the transition easier. Don't use me.
|
|
|
- * @param len The length to use.
|
|
|
- */
|
|
|
- void swap_only_length_temporary_function(const std::size_t len) {
|
|
|
- ENTT_ASSERT(mode == deletion_policy::swap_only, "Deletion policy mismatch");
|
|
|
- head = static_cast<underlying_type>(len);
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* @brief Erases an entity from a sparse set.
|
|
|
* @param it An iterator to the element to pop.
|
|
|
@@ -518,6 +509,15 @@ public:
|
|
|
return static_cast<size_type>(head);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @brief Sets the head of the free list, if possible.
|
|
|
+ * @param len The value to use as the new head of the free list.
|
|
|
+ */
|
|
|
+ void free_list(const size_type len) noexcept {
|
|
|
+ ENTT_ASSERT((mode == deletion_policy::swap_only) && !(len > packed.size()), "Invalid value");
|
|
|
+ head = static_cast<underlying_type>(len);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @brief Increases the capacity of a sparse set.
|
|
|
*
|