diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 738d05bb8..9f291be70 100644 --- a/src/entt/meta/meta.hpp +++ b/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; } diff --git a/test/entt/meta/meta.cpp b/test/entt/meta/meta.cpp index bec2943e2..0d4f4cadd 100644 --- a/test/entt/meta/meta.cpp +++ b/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::id()); + ASSERT_EQ(type.type_id(), entt::type_info::id()); type.prop([](auto prop) { ASSERT_EQ(prop.key(), props::prop_int); @@ -1795,7 +1795,7 @@ TEST_F(Meta, AbstractClass) { auto type = entt::resolve(); concrete_type instance; - ASSERT_EQ(type.id(), entt::type_info::id()); + ASSERT_EQ(type.type_id(), entt::type_info::id()); ASSERT_EQ(instance.i, 0); type.func("f"_hs).invoke(instance, 3);