Browse Source

*: removed deprecated stuff

Michele Caini 4 years ago
parent
commit
4993961c16

+ 0 - 27
src/entt/core/any.hpp

@@ -3,7 +3,6 @@
 
 
 
 
 #include <cstddef>
 #include <cstddef>
-#include <functional>
 #include <memory>
 #include <memory>
 #include <type_traits>
 #include <type_traits>
 #include <utility>
 #include <utility>
@@ -163,19 +162,6 @@ public:
         initialize<Type>(std::forward<Args>(args)...);
         initialize<Type>(std::forward<Args>(args)...);
     }
     }
 
 
-    /**
-     * @brief Constructs a wrapper that holds an unmanaged object.
-     * @tparam Type Type of object to use to initialize the wrapper.
-     * @param value An instance of an object to use to initialize the wrapper.
-     */
-    template<typename Type>
-    basic_any(std::reference_wrapper<Type> value) ENTT_NOEXCEPT
-        : basic_any{}
-    {
-        // invokes deprecated assignment operator (and avoids issues with vs2017)
-        *this = value;
-    }
-
     /**
     /**
      * @brief Constructs a wrapper from a given value.
      * @brief Constructs a wrapper from a given value.
      * @tparam Type Type of object to use to initialize the wrapper.
      * @tparam Type Type of object to use to initialize the wrapper.
@@ -242,19 +228,6 @@ public:
         return *this;
         return *this;
     }
     }
 
 
-    /**
-     * @brief Value assignment operator.
-     * @tparam Type Type of object to use to initialize the wrapper.
-     * @param value An instance of an object to use to initialize the wrapper.
-     * @return This any object.
-     */
-    template<typename Type>
-    [[deprecated("Use std::in_place_type<T &>, entt::make_any<T &>, emplace<Type &> or forward_as_any instead")]]
-    basic_any & operator=(std::reference_wrapper<Type> value) ENTT_NOEXCEPT {
-        emplace<Type &>(value.get());
-        return *this;
-    }
-
     /**
     /**
      * @brief Value assignment operator.
      * @brief Value assignment operator.
      * @tparam Type Type of object to use to initialize the wrapper.
      * @tparam Type Type of object to use to initialize the wrapper.

+ 0 - 17
src/entt/entity/handle.hpp

@@ -213,23 +213,6 @@ struct basic_handle {
         reg->template erase<Component...>(entt);
         reg->template erase<Component...>(entt);
     }
     }
 
 
-    /*! @copydoc remove */
-    template<typename... Component>
-    [[deprecated("Use ::remove instead")]]
-    size_type remove_if_exists() const {
-        return remove<Component...>();
-    }
-
-    /**
-     * @brief Removes all the components from a handle and makes it orphaned.
-     * @sa basic_registry::remove_all
-     */
-    [[deprecated("No longer supported")]]
-    void remove_all() const {
-        static_assert(sizeof...(Type) == 0, "Invalid operation");
-        reg->remove_all(entt);
-    }
-
     /**
     /**
      * @brief Checks if a handle has all the given components.
      * @brief Checks if a handle has all the given components.
      * @sa basic_registry::all_of
      * @sa basic_registry::all_of

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

@@ -266,15 +266,6 @@ public:
         }
         }
     }
     }
 
 
-    /**
-     * @brief Reserves enough space to store `count` pools.
-     * @param count Number of pools to reserve space for.
-     */
-    [[deprecated("No longer supported")]]
-    void reserve_pools(const size_t count) {
-        pools.reserve(count);
-    }
-
     /**
     /**
      * @brief Returns the capacity of the pool for the given component.
      * @brief Returns the capacity of the pool for the given component.
      * @tparam Component Type of component in which one is interested.
      * @tparam Component Type of component in which one is interested.
@@ -353,12 +344,6 @@ public:
         return free_list;
         return free_list;
     }
     }
 
 
-    /*! @copydoc released */
-    [[deprecated("Use ::released instead")]]
-    [[nodiscard]] entity_type destroyed() const ENTT_NOEXCEPT {
-        return released();
-    }
-
     /**
     /**
      * @brief Checks if an entity identifier refers to a valid entity.
      * @brief Checks if an entity identifier refers to a valid entity.
      * @param entity An entity identifier, either valid or not.
      * @param entity An entity identifier, either valid or not.
@@ -833,36 +818,6 @@ public:
         }
         }
     }
     }
 
 
-    /*! @copydoc remove */
-    template<typename... Component>
-    [[deprecated("Use ::remove instead")]]
-    size_type remove_if_exists(const entity_type entity) {
-        return remove<Component...>(entity);
-    }
-
-    /**
-     * @brief Removes all the components from an entity and makes it orphaned.
-     *
-     * @warning
-     * In case there are listeners that observe the destruction of components
-     * and assign other components to the entity in their bodies, the result of
-     * invoking this function may not be as expected. In the worst case, it
-     * could lead to undefined behavior.
-     *
-     * @warning
-     * Attempting to use an invalid entity results in undefined behavior.
-     *
-     * @param entity A valid entity identifier.
-     */
-    [[deprecated("Use ::destroy(entity)/::create(entity) instead")]]
-    void remove_all(const entity_type entity) {
-        ENTT_ASSERT(valid(entity), "Invalid entity");
-
-        for(auto &&pdata: pools) {
-            pdata.pool && pdata.pool->remove(entity, this);
-        }
-    }
-
     /**
     /**
      * @brief Checks if an entity has all the given components.
      * @brief Checks if an entity has all the given components.
      *
      *

+ 0 - 27
src/entt/meta/meta.hpp

@@ -3,7 +3,6 @@
 
 
 
 
 #include <cstddef>
 #include <cstddef>
-#include <functional>
 #include <iterator>
 #include <iterator>
 #include <memory>
 #include <memory>
 #include <type_traits>
 #include <type_traits>
@@ -238,19 +237,6 @@ public:
           vtable{&basic_vtable<std::remove_const_t<std::remove_reference_t<Type>>>}
           vtable{&basic_vtable<std::remove_const_t<std::remove_reference_t<Type>>>}
     {}
     {}
 
 
-    /**
-     * @brief Constructs a wrapper that holds an unmanaged object.
-     * @tparam Type Type of object to use to initialize the wrapper.
-     * @param value An instance of an object to use to initialize the wrapper.
-     */
-    template<typename Type>
-    meta_any(std::reference_wrapper<Type> value)
-        : meta_any{}
-    {
-        // invokes deprecated assignment operator (and avoids issues with vs2017)
-        *this = value;
-    }
-
     /**
     /**
      * @brief Constructs a wrapper from a given value.
      * @brief Constructs a wrapper from a given value.
      * @tparam Type Type of object to use to initialize the wrapper.
      * @tparam Type Type of object to use to initialize the wrapper.
@@ -308,19 +294,6 @@ public:
         return *this;
         return *this;
     }
     }
 
 
-    /**
-     * @brief Value assignment operator.
-     * @tparam Type Type of object to use to initialize the wrapper.
-     * @param value An instance of an object to use to initialize the wrapper.
-     * @return This meta any object.
-     */
-    template<typename Type>
-    [[deprecated("Use std::in_place_type<T &>, entt::make_meta<T &>, emplace<Type &> or forward_as_meta instead")]]
-    meta_any & operator=(std::reference_wrapper<Type> value) {
-        emplace<Type &>(value.get());
-        return *this;
-    }
-
     /**
     /**
      * @brief Value assignment operator.
      * @brief Value assignment operator.
      * @tparam Type Type of object to use to initialize the wrapper.
      * @tparam Type Type of object to use to initialize the wrapper.

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

@@ -156,7 +156,6 @@ TEST(Registry, Functionalities) {
     ASSERT_EQ(registry.size(), 0u);
     ASSERT_EQ(registry.size(), 0u);
     ASSERT_EQ(registry.alive(), 0u);
     ASSERT_EQ(registry.alive(), 0u);
     ASSERT_NO_FATAL_FAILURE((registry.reserve<int, char>(8)));
     ASSERT_NO_FATAL_FAILURE((registry.reserve<int, char>(8)));
-    ASSERT_NO_FATAL_FAILURE(registry.reserve_pools(16));
     ASSERT_NO_FATAL_FAILURE(registry.reserve(42));
     ASSERT_NO_FATAL_FAILURE(registry.reserve(42));
     ASSERT_TRUE(registry.empty());
     ASSERT_TRUE(registry.empty());