*: removed deprecated stuff

This commit is contained in:
Michele Caini
2021-07-22 15:20:08 +02:00
parent 89aece7c28
commit 4993961c16
5 changed files with 0 additions and 117 deletions

View File

@@ -3,7 +3,6 @@
#include <cstddef>
#include <functional>
#include <memory>
#include <type_traits>
#include <utility>
@@ -163,19 +162,6 @@ public:
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.
* @tparam Type Type of object to use to initialize the wrapper.
@@ -242,19 +228,6 @@ public:
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.
* @tparam Type Type of object to use to initialize the wrapper.

View File

@@ -213,23 +213,6 @@ struct basic_handle {
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.
* @sa basic_registry::all_of

View File

@@ -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.
* @tparam Component Type of component in which one is interested.
@@ -353,12 +344,6 @@ public:
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.
* @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.
*

View File

@@ -3,7 +3,6 @@
#include <cstddef>
#include <functional>
#include <iterator>
#include <memory>
#include <type_traits>
@@ -238,19 +237,6 @@ public:
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.
* @tparam Type Type of object to use to initialize the wrapper.
@@ -308,19 +294,6 @@ public:
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.
* @tparam Type Type of object to use to initialize the wrapper.

View File

@@ -156,7 +156,6 @@ TEST(Registry, Functionalities) {
ASSERT_EQ(registry.size(), 0u);
ASSERT_EQ(registry.alive(), 0u);
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_TRUE(registry.empty());