diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index b042f93d4..59ebe7ffa 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -446,7 +446,7 @@ public: info{other.info}, mode{other.mode}, head{std::exchange(other.head, policy_to_head())} { - ENTT_ASSERT(alloc_traits::is_always_equal::value || packed.get_allocator() == other.packed.get_allocator(), "Copying a sparse set is not allowed"); + ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed"); } /*! @brief Default destructor. */ @@ -460,7 +460,7 @@ public: * @return This sparse set. */ basic_sparse_set &operator=(basic_sparse_set &&other) noexcept { - ENTT_ASSERT(alloc_traits::is_always_equal::value || packed.get_allocator() == other.packed.get_allocator(), "Copying a sparse set is not allowed"); + ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a sparse set is not allowed"); release_sparse_pages(); sparse = std::move(other.sparse); diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 28a1fea81..4b15b9ccf 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -452,7 +452,7 @@ public: basic_storage(basic_storage &&other, const allocator_type &allocator) noexcept : base_type{std::move(other), allocator}, payload{std::move(other.payload), allocator} { - ENTT_ASSERT(alloc_traits::is_always_equal::value || payload.get_allocator() == other.payload.get_allocator(), "Copying a storage is not allowed"); + ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a storage is not allowed"); } /*! @brief Default destructor. */ @@ -466,7 +466,7 @@ public: * @return This storage. */ basic_storage &operator=(basic_storage &&other) noexcept { - ENTT_ASSERT(alloc_traits::is_always_equal::value || payload.get_allocator() == other.payload.get_allocator(), "Copying a storage is not allowed"); + ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.get_allocator(), "Copying a storage is not allowed"); shrink_to_size(0u); base_type::operator=(std::move(other));