|
|
@@ -366,6 +366,15 @@ public:
|
|
|
return entities.capacity();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @brief Requests the removal of unused capacity for a given component.
|
|
|
+ * @tparam Component Type of component for which to reclaim unused capacity.
|
|
|
+ */
|
|
|
+ template<typename Component>
|
|
|
+ void shrink_to_fit() {
|
|
|
+ assure<Component>()->shrink_to_fit();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @brief Checks whether the pool of a given component is empty.
|
|
|
* @tparam Component Type of component in which one is interested.
|
|
|
@@ -378,15 +387,6 @@ public:
|
|
|
return cpool ? cpool->empty() : true;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @brief Requests the removal of unused capacity for a given component.
|
|
|
- * @tparam Component Type of component for which to reclaim unused capacity.
|
|
|
- */
|
|
|
- template<typename Component>
|
|
|
- void shrink_to_fit() {
|
|
|
- assure<Component>()->shrink_to_fit();
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* @brief Checks if there exists at least an entity still in use.
|
|
|
* @return True if at least an entity is still in use, false otherwise.
|
|
|
@@ -1548,7 +1548,11 @@ public:
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- return { (*this = {}), force };
|
|
|
+ reset();
|
|
|
+ entities.clear();
|
|
|
+ available = {};
|
|
|
+
|
|
|
+ return { *this, force };
|
|
|
}
|
|
|
|
|
|
/**
|