From 5e8544cfc6620788c729d07c7f9ae31faeb088e9 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 10 Nov 2023 10:25:47 +0100 Subject: [PATCH] storage: void returned value type for storage entity --- src/entt/entity/storage.hpp | 2 +- test/entt/entity/storage_entity.cpp | 30 ++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index e5ce63ee9..7822f53a5 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -1009,7 +1009,7 @@ public: * @param allocator The allocator to use. */ explicit basic_storage(const allocator_type &allocator) - : base_type{type_id(), deletion_policy::swap_only, allocator} {} + : base_type{type_id(), deletion_policy::swap_only, allocator} {} /** * @brief Move constructor. diff --git a/test/entt/entity/storage_entity.cpp b/test/entt/entity/storage_entity.cpp index fa1695002..dedbfcbb6 100644 --- a/test/entt/entity/storage_entity.cpp +++ b/test/entt/entity/storage_entity.cpp @@ -17,13 +17,13 @@ TEST(StorageEntity, Constructors) { ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_only); ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); pool = entt::storage{std::allocator{}}; ASSERT_EQ(pool.policy(), entt::deletion_policy::swap_only); ASSERT_NO_FATAL_FAILURE([[maybe_unused]] auto alloc = pool.get_allocator()); - ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); } TEST(StorageEntity, Move) { @@ -39,8 +39,8 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); ASSERT_EQ(pool.at(0u), static_cast(entt::null)); ASSERT_EQ(other.at(0u), entt::entity{3}); @@ -50,8 +50,8 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(other.empty()); ASSERT_FALSE(extended.empty()); - ASSERT_EQ(other.type(), entt::type_id()); - ASSERT_EQ(extended.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(extended.type(), entt::type_id()); ASSERT_EQ(other.at(0u), static_cast(entt::null)); ASSERT_EQ(extended.at(0u), entt::entity{3}); @@ -62,9 +62,9 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(other.empty()); ASSERT_TRUE(extended.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); - ASSERT_EQ(extended.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(extended.type(), entt::type_id()); ASSERT_EQ(pool.at(0u), entt::entity{3}); ASSERT_EQ(other.at(0u), static_cast(entt::null)); @@ -77,8 +77,8 @@ TEST(StorageEntity, Move) { ASSERT_TRUE(pool.empty()); ASSERT_FALSE(other.empty()); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); ASSERT_EQ(pool.at(0u), static_cast(entt::null)); ASSERT_EQ(other.at(0u), entt::entity{3}); @@ -88,8 +88,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.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); pool.emplace(entt::entity{42}); @@ -102,8 +102,8 @@ TEST(StorageEntity, Swap) { pool.swap(other); - ASSERT_EQ(pool.type(), entt::type_id()); - ASSERT_EQ(other.type(), entt::type_id()); + ASSERT_EQ(pool.type(), entt::type_id()); + ASSERT_EQ(other.type(), entt::type_id()); ASSERT_EQ(pool.size(), 10u); ASSERT_EQ(other.size(), 43u);