Explorar o código

registry: drop ::capacity (deprecated function)

Michele Caini %!s(int64=2) %!d(string=hai) anos
pai
achega
5f184ed655
Modificáronse 2 ficheiros con 1 adicións e 10 borrados
  1. 0 9
      src/entt/entity/registry.hpp
  2. 1 1
      test/entt/entity/registry.cpp

+ 0 - 9
src/entt/entity/registry.hpp

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

+ 1 - 1
test/entt/entity/registry.cpp

@@ -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);