diff --git a/TODO b/TODO index 45ec72938..96f6b43f0 100644 --- a/TODO +++ b/TODO @@ -36,4 +36,3 @@ TODO: * improve non-const allow cast with in-place switch * meta fixed_size could return the size directly if present * setup testbed workflow on the CI and review build process for testbed (i.e. tests first due to SDL) -* type() -> info() for consistency (sparse_set) diff --git a/docs/md/entity.md b/docs/md/entity.md index 90313bbed..036cf508c 100644 --- a/docs/md/entity.md +++ b/docs/md/entity.md @@ -1548,7 +1548,7 @@ is not known), there is always the possibility of receiving a `type_info` object for the type of elements associated with the entities (if any): ```cpp -if(entt::type_id() == base.type()) { +if(entt::type_id() == base.info()) { // ... } ``` diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index 53e7efa4f..7ebe9e0b5 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -151,7 +151,7 @@ public: [[nodiscard]] bool owned(const id_type hash) const noexcept override { for(size_type pos{}; pos < Owned; ++pos) { - if(pools[pos]->type().hash() == hash) { + if(pools[pos]->info().hash() == hash) { return true; } } diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index a87409dd1..a8841ecfe 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -251,7 +251,7 @@ class basic_registry { using storage_type = storage_for_type; if(auto it = pools.find(id); it != pools.cend()) { - ENTT_ASSERT(it->second->type() == type_id(), "Unexpected type"); + ENTT_ASSERT(it->second->info() == type_id(), "Unexpected type"); return static_cast(*it->second); } @@ -281,7 +281,7 @@ class basic_registry { return &entities; } else { if(const auto it = pools.find(id); it != pools.cend()) { - ENTT_ASSERT(it->second->type() == type_id(), "Unexpected type"); + ENTT_ASSERT(it->second->info() == type_id(), "Unexpected type"); return static_cast *>(it->second.get()); } diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index 76d1c5114..7b3ad6524 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -433,7 +433,7 @@ public: explicit basic_sparse_set(const type_info &elem, deletion_policy pol = deletion_policy::swap_and_pop, const allocator_type &allocator = {}) : sparse{allocator}, packed{allocator}, - info{&elem}, + descriptor{&elem}, mode{pol}, head{policy_to_head()} { ENTT_ASSERT(traits_type::version_mask || mode != deletion_policy::in_place, "Policy does not support zero-sized versions"); @@ -449,7 +449,7 @@ public: basic_sparse_set(basic_sparse_set &&other) noexcept : sparse{std::move(other.sparse)}, packed{std::move(other.packed)}, - info{other.info}, + descriptor{other.descriptor}, mode{other.mode}, head{std::exchange(other.head, policy_to_head())} {} @@ -461,7 +461,7 @@ public: basic_sparse_set(basic_sparse_set &&other, const allocator_type &allocator) : sparse{std::move(other.sparse), allocator}, packed{std::move(other.packed), allocator}, - info{other.info}, + descriptor{other.descriptor}, mode{other.mode}, head{std::exchange(other.head, policy_to_head())} { ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed"); @@ -497,7 +497,7 @@ public: using std::swap; swap(sparse, other.sparse); swap(packed, other.packed); - swap(info, other.info); + swap(descriptor, other.descriptor); swap(mode, other.mode); swap(head, other.head); } @@ -1079,11 +1079,16 @@ public: } /** - * @brief Returned value type, if any. - * @return Returned value type, if any. + * @brief Returns a type info object for the value type, if any. + * @return A type info object for the value type, if any. */ - [[nodiscard]] const type_info &type() const noexcept { - return *info; + [[nodiscard]] const type_info &info() const noexcept { + return *descriptor; + } + + /*! @copydoc info */ + [[deprecated("use ::info instead")]] const type_info &type() const noexcept { + return info(); } /** @@ -1099,7 +1104,7 @@ public: private: sparse_container_type sparse; packed_container_type packed; - const type_info *info; + const type_info *descriptor; deletion_policy mode; size_type head; }; diff --git a/src/entt/meta/meta.hpp b/src/entt/meta/meta.hpp index 7864f6a87..b338ed9b6 100644 --- a/src/entt/meta/meta.hpp +++ b/src/entt/meta/meta.hpp @@ -384,7 +384,7 @@ public: return *this; } - /*! @copydoc any::type */ + /*! @copydoc any::info */ [[nodiscard]] inline meta_type type() const noexcept; /** diff --git a/test/entt/entity/handle.cpp b/test/entt/entity/handle.cpp index 0e4bcae05..3cb66be3d 100644 --- a/test/entt/entity/handle.cpp +++ b/test/entt/entity/handle.cpp @@ -93,7 +93,7 @@ TYPED_TEST(BasicHandle, Storage) { ASSERT_NE(handle.storage().begin(), handle.storage().end()); ASSERT_EQ(++handle.storage().begin(), handle.storage().end()); - ASSERT_EQ(handle.storage().begin()->second.type(), entt::type_id()); + ASSERT_EQ(handle.storage().begin()->second.info(), entt::type_id()); } ENTT_DEBUG_TYPED_TEST(BasicHandleDeathTest, Storage) { diff --git a/test/entt/entity/reactive_mixin.cpp b/test/entt/entity/reactive_mixin.cpp index 0e96bdd87..e28b14e68 100644 --- a/test/entt/entity/reactive_mixin.cpp +++ b/test/entt/entity/reactive_mixin.cpp @@ -56,13 +56,13 @@ TYPED_TEST(ReactiveMixin, Constructors) { ASSERT_EQ(pool.policy(), entt::deletion_policy{traits_type::in_place_delete}); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); pool = entt::reactive_mixin>{std::allocator{}}; ASSERT_EQ(pool.policy(), entt::deletion_policy{traits_type::in_place_delete}); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); } TYPED_TEST(ReactiveMixin, Move) { @@ -80,7 +80,7 @@ TYPED_TEST(ReactiveMixin, Move) { static_assert(std::is_move_assignable_v, "Move assignable type required"); ASSERT_TRUE(pool.contains(entity[0u])); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); entt::reactive_mixin> other{std::move(pool)}; @@ -89,7 +89,7 @@ TYPED_TEST(ReactiveMixin, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); ASSERT_EQ(&other.registry(), ®istry); @@ -149,8 +149,8 @@ TYPED_TEST(ReactiveMixin, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(pool.size(), 1u); ASSERT_EQ(other.size(), 1u); diff --git a/test/entt/entity/registry.cpp b/test/entt/entity/registry.cpp index 98cc5fb77..e4cf431c2 100644 --- a/test/entt/entity/registry.cpp +++ b/test/entt/entity/registry.cpp @@ -466,9 +466,9 @@ TEST(Registry, RegistryStorageIteratorConversion) { testing::StaticAssertTypeEq>(); ASSERT_EQ(it->first, entt::type_id().hash()); - ASSERT_EQ((*it).second.type(), entt::type_id()); + ASSERT_EQ((*it).second.info(), entt::type_id()); ASSERT_EQ(it->first, cit->first); - ASSERT_EQ((*it).second.type(), (*cit).second.type()); + ASSERT_EQ((*it).second.info(), (*cit).second.info()); ASSERT_EQ(it - cit, 0); ASSERT_EQ(cit - it, 0); @@ -1442,7 +1442,7 @@ TEST(Registry, EraseIf) { ASSERT_FALSE(registry.storage("other"_hs).contains(entity)); ASSERT_TRUE(registry.storage().contains(entity)); - registry.erase_if(entity, [](auto, const auto &storage) { return storage.type() == entt::type_id(); }); + registry.erase_if(entity, [](auto, const auto &storage) { return storage.info() == entt::type_id(); }); ASSERT_TRUE(registry.storage().contains(entity)); ASSERT_FALSE(registry.storage("other"_hs).contains(entity)); @@ -2546,8 +2546,8 @@ TEST(Registry, VoidType) { ASSERT_FALSE(registry.storage("custom"_hs).empty()); ASSERT_TRUE(registry.storage("custom"_hs).contains(entity)); - ASSERT_EQ(registry.storage().type(), entt::type_id()); - ASSERT_EQ(registry.storage("custom"_hs).type(), entt::type_id()); + ASSERT_EQ(registry.storage().info(), entt::type_id()); + ASSERT_EQ(registry.storage("custom"_hs).info(), entt::type_id()); } TEST(Registry, NoEtoType) { diff --git a/test/entt/entity/sigh_mixin.cpp b/test/entt/entity/sigh_mixin.cpp index 6ca3bd702..1bee4c9e2 100644 --- a/test/entt/entity/sigh_mixin.cpp +++ b/test/entt/entity/sigh_mixin.cpp @@ -231,7 +231,7 @@ TEST(SighMixin, VoidType) { pool.emplace(entity); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); ASSERT_TRUE(pool.contains(entity)); entt::sigh_mixin> other{std::move(pool)}; @@ -336,7 +336,7 @@ TYPED_TEST(SighMixin, Move) { static_assert(std::is_move_constructible_v, "Move constructible type required"); static_assert(std::is_move_assignable_v, "Move assignable type required"); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); entt::sigh_mixin> other{std::move(pool)}; @@ -345,7 +345,7 @@ TYPED_TEST(SighMixin, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entt::entity{3}), 0u); ASSERT_EQ(other.get(entt::entity{3}), value_type{3}); @@ -408,8 +408,8 @@ TYPED_TEST(SighMixin, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(pool.size(), 1u + traits_type::in_place_delete); ASSERT_EQ(other.size(), 1u); diff --git a/test/entt/entity/sparse_set.cpp b/test/entt/entity/sparse_set.cpp index 991a140c9..d417d4118 100644 --- a/test/entt/entity/sparse_set.cpp +++ b/test/entt/entity/sparse_set.cpp @@ -58,7 +58,7 @@ TYPED_TEST(SparseSet, Constructors) { ASSERT_EQ(set.policy(), entt::deletion_policy::swap_and_pop); ASSERT_NO_THROW([[maybe_unused]] auto alloc = set.get_allocator()); - ASSERT_EQ(set.type(), entt::type_id()); + ASSERT_EQ(set.info(), entt::type_id()); set = sparse_set_type{allocator_type{}}; @@ -70,7 +70,7 @@ TYPED_TEST(SparseSet, Constructors) { ASSERT_EQ(set.policy(), policy); ASSERT_NO_THROW([[maybe_unused]] auto alloc = set.get_allocator()); - ASSERT_EQ(set.type(), entt::type_id()); + ASSERT_EQ(set.info(), entt::type_id()); set = sparse_set_type{entt::type_id(), policy, allocator_type{}}; diff --git a/test/entt/entity/storage.cpp b/test/entt/entity/storage.cpp index 0aca40177..157add9da 100644 --- a/test/entt/entity/storage.cpp +++ b/test/entt/entity/storage.cpp @@ -96,13 +96,13 @@ TYPED_TEST(Storage, Constructors) { ASSERT_EQ(pool.policy(), entt::deletion_policy{traits_type::in_place_delete}); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); pool = entt::storage{std::allocator{}}; ASSERT_EQ(pool.policy(), entt::deletion_policy{traits_type::in_place_delete}); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); } TYPED_TEST(Storage, Move) { @@ -123,7 +123,7 @@ TYPED_TEST(Storage, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); ASSERT_EQ(other.get(entity[0u]), value_type{3}); @@ -134,7 +134,7 @@ TYPED_TEST(Storage, Move) { ASSERT_TRUE(other.empty()); ASSERT_FALSE(extended.empty()); - ASSERT_EQ(extended.type(), entt::type_id()); + ASSERT_EQ(extended.info(), entt::type_id()); ASSERT_EQ(extended.index(entity[0u]), 0u); ASSERT_EQ(extended.get(entity[0u]), value_type{3}); @@ -145,7 +145,7 @@ TYPED_TEST(Storage, Move) { ASSERT_TRUE(other.empty()); ASSERT_TRUE(extended.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); ASSERT_EQ(pool.index(entity[0u]), 0u); ASSERT_EQ(pool.get(entity[0u]), value_type{3}); @@ -157,7 +157,7 @@ TYPED_TEST(Storage, Move) { ASSERT_FALSE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); ASSERT_EQ(other.get(entity[0u]), value_type{3}); } @@ -169,8 +169,8 @@ TYPED_TEST(Storage, Swap) { entt::storage pool; entt::storage other; - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); pool.emplace(entt::entity{4}, 1); @@ -183,8 +183,8 @@ TYPED_TEST(Storage, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(pool.size(), 1u + traits_type::in_place_delete); ASSERT_EQ(other.size(), 1u); @@ -721,8 +721,8 @@ TEST(Storage, TryEmplaceNonDefaultConstructible) { entt::sparse_set &base = pool; const std::array entity{entt::entity{1}, entt::entity{3}}; - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(pool.type(), base.type()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(pool.info(), base.info()); ASSERT_FALSE(pool.contains(entity[0u])); ASSERT_FALSE(pool.contains(entity[1u])); @@ -764,8 +764,8 @@ TEST(Storage, TryEmplaceNonCopyConstructible) { entt::sparse_set &base = pool; const std::array entity{entt::entity{1}, entt::entity{3}}; - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(pool.type(), base.type()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(pool.info(), base.info()); ASSERT_FALSE(pool.contains(entity[0u])); ASSERT_FALSE(pool.contains(entity[1u])); diff --git a/test/entt/entity/storage_entity.cpp b/test/entt/entity/storage_entity.cpp index 561b2e6ab..9fdbfd97f 100644 --- a/test/entt/entity/storage_entity.cpp +++ b/test/entt/entity/storage_entity.cpp @@ -19,13 +19,13 @@ TEST(StorageEntity, Constructors) { ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_only); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); pool = entt::storage{std::allocator{}}; ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_only); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); } TEST(StorageEntity, Move) { @@ -44,7 +44,7 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); entt::storage extended{std::move(other), std::allocator{}}; @@ -54,7 +54,7 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(other.empty()); ASSERT_FALSE(extended.empty()); - ASSERT_EQ(extended.type(), entt::type_id()); + ASSERT_EQ(extended.info(), entt::type_id()); ASSERT_EQ(extended.index(entity[0u]), 0u); pool = std::move(extended); @@ -64,7 +64,7 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(other.empty()); ASSERT_TRUE(extended.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); ASSERT_EQ(pool.index(entity[0u]), 0u); other = entt::storage{}; @@ -75,7 +75,7 @@ TEST(StorageEntity, Move) { ASSERT_FALSE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); } @@ -83,8 +83,8 @@ TEST(StorageEntity, Swap) { entt::storage pool; entt::storage other; - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); pool.generate(entt::entity{4}); @@ -97,8 +97,8 @@ TEST(StorageEntity, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(pool.size(), 2u); ASSERT_EQ(other.size(), 1u); diff --git a/test/entt/entity/storage_no_instance.cpp b/test/entt/entity/storage_no_instance.cpp index 037a7f3fd..8d88944d9 100644 --- a/test/entt/entity/storage_no_instance.cpp +++ b/test/entt/entity/storage_no_instance.cpp @@ -64,13 +64,13 @@ TYPED_TEST(StorageNoInstance, Constructors) { ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_and_pop); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); pool = entt::storage{std::allocator{}}; ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_and_pop); ASSERT_NO_THROW([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); } TYPED_TEST(StorageNoInstance, Move) { @@ -91,7 +91,7 @@ TYPED_TEST(StorageNoInstance, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); entt::storage extended{std::move(other), std::allocator{}}; @@ -101,7 +101,7 @@ TYPED_TEST(StorageNoInstance, Move) { ASSERT_TRUE(other.empty()); ASSERT_FALSE(extended.empty()); - ASSERT_EQ(extended.type(), entt::type_id()); + ASSERT_EQ(extended.info(), entt::type_id()); ASSERT_EQ(extended.index(entity[0u]), 0u); pool = std::move(extended); @@ -111,7 +111,7 @@ TYPED_TEST(StorageNoInstance, Move) { ASSERT_TRUE(other.empty()); ASSERT_TRUE(extended.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); ASSERT_EQ(pool.index(entity[0u]), 0u); other = entt::storage{}; @@ -122,7 +122,7 @@ TYPED_TEST(StorageNoInstance, Move) { ASSERT_FALSE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(other.index(entity[0u]), 0u); } @@ -132,8 +132,8 @@ TYPED_TEST(StorageNoInstance, Swap) { entt::storage pool; entt::storage other; - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); pool.emplace(entt::entity{4}); @@ -146,8 +146,8 @@ TYPED_TEST(StorageNoInstance, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.info(), entt::type_id()); + ASSERT_EQ(other.info(), entt::type_id()); ASSERT_EQ(pool.size(), 1u); ASSERT_EQ(other.size(), 1u); diff --git a/test/entt/entity/view.cpp b/test/entt/entity/view.cpp index db187c56a..bdab75cdd 100644 --- a/test/entt/entity/view.cpp +++ b/test/entt/entity/view.cpp @@ -855,19 +855,19 @@ TEST(MultiStorageView, UseAndRefresh) { view.use(); - ASSERT_EQ(view.handle()->type(), entt::type_id()); + ASSERT_EQ(view.handle()->info(), entt::type_id()); ASSERT_EQ(view.front(), entity[1u]); ASSERT_EQ(view.back(), entity[0u]); view.use(); - ASSERT_EQ(view.handle()->type(), entt::type_id()); + ASSERT_EQ(view.handle()->info(), entt::type_id()); ASSERT_EQ(view.front(), entity[0u]); ASSERT_EQ(view.back(), entity[1u]); view.refresh(); - ASSERT_EQ(view.handle()->type(), entt::type_id()); + ASSERT_EQ(view.handle()->info(), entt::type_id()); } TEST(MultiStorageView, Each) { diff --git a/test/example/entity_copy.cpp b/test/example/entity_copy.cpp index 838d00515..51351869e 100644 --- a/test/example/entity_copy.cpp +++ b/test/example/entity_copy.cpp @@ -106,7 +106,7 @@ TYPED_TEST(EntityCopy, CrossRegistry) { if(!other) { using namespace entt::literals; - entt::resolve(storage.type()).invoke("storage"_hs, {}, entt::forward_as_meta(dst), id); + entt::resolve(storage.info()).invoke("storage"_hs, {}, entt::forward_as_meta(dst), id); other = dst.storage(id); }