registry: decouple asserts

This commit is contained in:
Michele Caini
2022-07-26 09:41:01 +02:00
parent de9d3c04e2
commit 0424b63bf1

View File

@@ -661,7 +661,8 @@ public:
* @return The version actually assigned to the entity.
*/
version_type release(const entity_type entt, const version_type version) {
ENTT_ASSERT(valid(entt) && orphan(entt), "Invalid or non-orphan entity");
ENTT_ASSERT(valid(entt), "Invalid identifier");
ENTT_ASSERT(std::all_of(pools.cbegin(), pools.cend(), [entt](auto &&curr) { return (curr.second->current(entt) == entity_traits::to_version(entt::tombstone)); }), "Non-orphan entity");
return release_entity(entt, version);
}