registry: drop ::capacity (deprecated function)

This commit is contained in:
Michele Caini
2023-06-16 11:25:07 +02:00
parent abad59f0ce
commit 5f184ed655
2 changed files with 1 additions and 10 deletions

View File

@@ -456,15 +456,6 @@ public:
return assure<Type>(id);
}
/**
* @brief Returns the number of entities that a registry has currently
* allocated space for.
* @return Capacity of the registry.
*/
[[deprecated("use .storage<Entity>().capacity() instead")]] [[nodiscard]] size_type capacity() const noexcept {
return entities.capacity();
}
/**
* @brief Direct access to the list of entities of a registry.
*

View File

@@ -244,7 +244,7 @@ TEST(Registry, Functionalities) {
ASSERT_EQ(registry.storage<entt::entity>().size(), 0u);
ASSERT_EQ(registry.storage<entt::entity>().in_use(), 0u);
ASSERT_NO_FATAL_FAILURE(registry.storage<entt::entity>().reserve(42));
ASSERT_EQ(registry.capacity(), 42u);
ASSERT_EQ(registry.storage<entt::entity>().capacity(), 42u);
ASSERT_TRUE(registry.storage<entt::entity>().empty());
ASSERT_EQ(registry.storage<int>().size(), 0u);