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

This commit is contained in:
Michele Caini
2020-04-19 17:53:43 +02:00
parent e99e1dc2ac
commit 1cfe517db8
2 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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);