registry: drop ::empty (deprecated function)
This commit is contained in:
@@ -481,14 +481,6 @@ public:
|
||||
return entities.capacity();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Checks whether the registry is empty (no entities still in use).
|
||||
* @return True if the registry is empty, false otherwise.
|
||||
*/
|
||||
[[deprecated("use .storage<Entity>().in_use() instead")]] [[nodiscard]] bool empty() const {
|
||||
return !alive();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Direct access to the list of entities of a registry.
|
||||
*
|
||||
|
||||
@@ -172,7 +172,9 @@ public:
|
||||
basic_snapshot_loader(registry_type &source) noexcept
|
||||
: reg{&source} {
|
||||
// restoring a snapshot as a whole requires a clean registry
|
||||
ENTT_ASSERT(reg->empty(), "Registry must be empty");
|
||||
for([[maybe_unused]] auto [id, elem]: source.storage()) {
|
||||
ENTT_ASSERT(elem.empty(), "Registry must be empty");
|
||||
}
|
||||
}
|
||||
|
||||
/*! @brief Default move constructor. */
|
||||
|
||||
Reference in New Issue
Block a user