registry: drop ::empty (deprecated function)

This commit is contained in:
Michele Caini
2023-06-16 11:18:10 +02:00
parent d7d0ba498c
commit 57d8072901
4 changed files with 12 additions and 17 deletions

View File

@@ -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.
*

View File

@@ -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. */