observer: removed deprecated functions

This commit is contained in:
Michele Caini
2020-05-10 16:34:55 +02:00
parent 471651ac5a
commit 78d43a49c6
2 changed files with 5 additions and 20 deletions

View File

@@ -64,13 +64,6 @@ struct basic_collector<> {
static constexpr auto update() ENTT_NOEXCEPT {
return basic_collector<matcher<type_list<>, type_list<>, AnyOf>>{};
}
/*! @copydoc update */
template<typename AnyOf>
[[deprecated("use ::update instead")]]
static constexpr auto replace() ENTT_NOEXCEPT {
return update<AnyOf>();
}
};
/**
@@ -107,14 +100,6 @@ struct basic_collector<matcher<type_list<Reject...>, type_list<Require...>, Rule
return basic_collector<matcher<type_list<>, type_list<>, AnyOf>, current_type, Other...>{};
}
/*! @copydoc update */
template<typename AnyOf>
[[deprecated("use ::update instead")]]
static constexpr auto replace() ENTT_NOEXCEPT {
return update<AnyOf>();
}
/**
* @brief Updates the filter of the last added matcher.
* @tparam AllOf Types of components required by the matcher.

View File

@@ -134,7 +134,7 @@ TEST(Observer, AllOfFiltered) {
TEST(Observer, Observe) {
entt::registry registry;
entt::observer observer{registry, entt::collector.replace<int>().replace<char>()};
entt::observer observer{registry, entt::collector.update<int>().update<char>()};
const auto entity = registry.create();
ASSERT_TRUE(observer.empty());
@@ -168,7 +168,7 @@ TEST(Observer, Observe) {
TEST(Observer, ObserveFiltered) {
constexpr auto collector = entt::collector
.replace<int>().where<char>(entt::exclude<double>);
.update<int>().where<char>(entt::exclude<double>);
entt::registry registry;
entt::observer observer{registry, collector};
@@ -215,7 +215,7 @@ TEST(Observer, AllOfObserve) {
entt::observer observer{};
const auto entity = registry.create();
observer.connect(registry, entt::collector.group<int>().replace<char>());
observer.connect(registry, entt::collector.group<int>().update<char>());
ASSERT_TRUE(observer.empty());
@@ -287,8 +287,8 @@ TEST(Observer, Each) {
TEST(Observer, MultipleFilters) {
constexpr auto collector = entt::collector
.replace<int>().where<char>()
.replace<double>().where<float>();
.update<int>().where<char>()
.update<double>().where<float>();
entt::registry registry;
entt::observer observer{registry, collector};