meta: drop seek functions
This commit is contained in:
@@ -65,14 +65,6 @@ protected:
|
||||
mask = nullptr;
|
||||
}
|
||||
|
||||
void data(const id_type id) {
|
||||
ENTT_ASSERT(owner->details->data.contains(id), "Invalid id");
|
||||
auto &&elem = owner->details->data[id];
|
||||
bucket = &elem.prop;
|
||||
user = &elem.custom;
|
||||
mask = &elem.traits;
|
||||
}
|
||||
|
||||
void data(const id_type id, meta_data_node node) {
|
||||
auto &&it = owner->details->data.insert_or_assign(id, std::move(node)).first;
|
||||
bucket = &it->second.prop;
|
||||
@@ -80,14 +72,6 @@ protected:
|
||||
mask = &it->second.traits;
|
||||
}
|
||||
|
||||
void func(const id_type id) {
|
||||
ENTT_ASSERT(owner->details->func.contains(id), "Invalid id");
|
||||
auto &&elem = owner->details->func[id];
|
||||
bucket = &elem.prop;
|
||||
user = &elem.custom;
|
||||
mask = &elem.traits;
|
||||
}
|
||||
|
||||
void func(const id_type id, meta_func_node node) {
|
||||
if(auto it = owner->details->func.find(id); it != owner->details->func.end()) {
|
||||
for(auto *curr = &it->second; curr; curr = curr->next.get()) {
|
||||
@@ -316,16 +300,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Seeks an arbitrary meta data in a meta type.
|
||||
* @param id Unique identifier.
|
||||
* @return A meta factory for the parent type.
|
||||
*/
|
||||
meta_factory data(const id_type id) noexcept {
|
||||
base_type::data(id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assigns a meta data to a meta type.
|
||||
*
|
||||
@@ -455,16 +429,6 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Seeks an arbitrary meta function in a meta type.
|
||||
* @param id Unique identifier.
|
||||
* @return A meta factory for the parent type.
|
||||
*/
|
||||
meta_factory func(const id_type id) noexcept {
|
||||
base_type::func(id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Assigns a meta function to a meta type.
|
||||
*
|
||||
|
||||
@@ -675,21 +675,6 @@ TEST_F(MetaData, SetGetFromBase) {
|
||||
ASSERT_EQ(instance.value, 1);
|
||||
}
|
||||
|
||||
TEST_F(MetaData, Seek) {
|
||||
using namespace entt::literals;
|
||||
|
||||
auto data = entt::resolve<clazz>().data("i"_hs);
|
||||
|
||||
ASSERT_TRUE(data);
|
||||
ASSERT_FALSE(data.prop('c'));
|
||||
|
||||
entt::meta<clazz>()
|
||||
.data("i"_hs)
|
||||
.prop('c');
|
||||
|
||||
ASSERT_TRUE(data.prop('c'));
|
||||
}
|
||||
|
||||
TEST_F(MetaData, ReRegistration) {
|
||||
using namespace entt::literals;
|
||||
|
||||
|
||||
@@ -640,21 +640,6 @@ TEST_F(MetaFunc, ExternalMemberFunction) {
|
||||
ASSERT_TRUE(registry.all_of<function>(entity));
|
||||
}
|
||||
|
||||
TEST_F(MetaFunc, Seek) {
|
||||
using namespace entt::literals;
|
||||
|
||||
auto func = entt::resolve<function>().func("f2"_hs);
|
||||
|
||||
ASSERT_TRUE(func);
|
||||
ASSERT_FALSE(func.prop('c'));
|
||||
|
||||
entt::meta<function>()
|
||||
.func("f2"_hs)
|
||||
.prop('c');
|
||||
|
||||
ASSERT_TRUE(func.prop('c'));
|
||||
}
|
||||
|
||||
TEST_F(MetaFunc, ReRegistration) {
|
||||
using namespace entt::literals;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user