Browse Source

meta: meta_type::id -> meta_type::type_id

Michele Caini 5 years ago
parent
commit
1cfe517db8
2 changed files with 5 additions and 5 deletions
  1. 3 3
      src/entt/meta/meta.hpp
  2. 2 2
      test/entt/meta/meta.cpp

+ 3 - 3
src/entt/meta/meta.hpp

@@ -1145,10 +1145,10 @@ public:
     {}
 
     /**
-     * @brief Returns the id of the underlying type.
-     * @return The id of the underlying type.
+     * @brief Returns the type id of the underlying type.
+     * @return The type id of the underlying type.
      */
-    id_type id() const ENTT_NOEXCEPT {
+    id_type type_id() const ENTT_NOEXCEPT {
         return node->type_id;
     }
 

+ 2 - 2
test/entt/meta/meta.cpp

@@ -1571,7 +1571,7 @@ TEST_F(Meta, MetaType) {
     ASSERT_TRUE(type);
     ASSERT_NE(type, entt::meta_type{});
     ASSERT_EQ(type.alias(), "derived"_hs);
-    ASSERT_EQ(type.id(), entt::type_info<derived_type>::id());
+    ASSERT_EQ(type.type_id(), entt::type_info<derived_type>::id());
 
     type.prop([](auto prop) {
         ASSERT_EQ(prop.key(), props::prop_int);
@@ -1795,7 +1795,7 @@ TEST_F(Meta, AbstractClass) {
     auto type = entt::resolve<an_abstract_type>();
     concrete_type instance;
 
-    ASSERT_EQ(type.id(), entt::type_info<an_abstract_type>::id());
+    ASSERT_EQ(type.type_id(), entt::type_info<an_abstract_type>::id());
     ASSERT_EQ(instance.i, 0);
 
     type.func("f"_hs).invoke(instance, 3);