Просмотр исходного кода

registry: drop ::reserve (deprecated function)

Michele Caini 2 лет назад
Родитель
Сommit
abad59f0ce
2 измененных файлов с 1 добавлено и 9 удалено
  1. 0 8
      src/entt/entity/registry.hpp
  2. 1 1
      test/entt/entity/registry.cpp

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

@@ -456,14 +456,6 @@ public:
         return assure<Type>(id);
     }
 
-    /**
-     * @brief Increases the capacity (number of entities) of the registry.
-     * @param cap Desired capacity.
-     */
-    [[deprecated("use .storage<Entity>().reserve(cap) instead")]] void reserve(const size_type cap) {
-        entities.reserve(cap);
-    }
-
     /**
      * @brief Returns the number of entities that a registry has currently
      * allocated space for.

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

@@ -243,7 +243,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.reserve(42));
+    ASSERT_NO_FATAL_FAILURE(registry.storage<entt::entity>().reserve(42));
     ASSERT_EQ(registry.capacity(), 42u);
     ASSERT_TRUE(registry.storage<entt::entity>().empty());