Browse Source

meta: drop seek functions

Michele Caini 1 year ago
parent
commit
af6dd28c66
3 changed files with 0 additions and 66 deletions
  1. 0 36
      src/entt/meta/factory.hpp
  2. 0 15
      test/entt/meta/meta_data.cpp
  3. 0 15
      test/entt/meta/meta_func.cpp

+ 0 - 36
src/entt/meta/factory.hpp

@@ -65,14 +65,6 @@ protected:
         mask = nullptr;
         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) {
     void data(const id_type id, meta_data_node node) {
         auto &&it = owner->details->data.insert_or_assign(id, std::move(node)).first;
         auto &&it = owner->details->data.insert_or_assign(id, std::move(node)).first;
         bucket = &it->second.prop;
         bucket = &it->second.prop;
@@ -80,14 +72,6 @@ protected:
         mask = &it->second.traits;
         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) {
     void func(const id_type id, meta_func_node node) {
         if(auto it = owner->details->func.find(id); it != owner->details->func.end()) {
         if(auto it = owner->details->func.find(id); it != owner->details->func.end()) {
             for(auto *curr = &it->second; curr; curr = curr->next.get()) {
             for(auto *curr = &it->second; curr; curr = curr->next.get()) {
@@ -316,16 +300,6 @@ public:
         return *this;
         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.
      * @brief Assigns a meta data to a meta type.
      *
      *
@@ -455,16 +429,6 @@ public:
         return *this;
         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.
      * @brief Assigns a meta function to a meta type.
      *
      *

+ 0 - 15
test/entt/meta/meta_data.cpp

@@ -675,21 +675,6 @@ TEST_F(MetaData, SetGetFromBase) {
     ASSERT_EQ(instance.value, 1);
     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) {
 TEST_F(MetaData, ReRegistration) {
     using namespace entt::literals;
     using namespace entt::literals;
 
 

+ 0 - 15
test/entt/meta/meta_func.cpp

@@ -640,21 +640,6 @@ TEST_F(MetaFunc, ExternalMemberFunction) {
     ASSERT_TRUE(registry.all_of<function>(entity));
     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) {
 TEST_F(MetaFunc, ReRegistration) {
     using namespace entt::literals;
     using namespace entt::literals;