From 776ec965651dca6d3df2af35a732d6786f31eafd Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 31 Aug 2023 09:39:35 +0200 Subject: [PATCH] sparse_set: minor changes --- src/entt/entity/sparse_set.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/entt/entity/sparse_set.hpp b/src/entt/entity/sparse_set.hpp index f72837617..2da520f2a 100644 --- a/src/entt/entity/sparse_set.hpp +++ b/src/entt/entity/sparse_set.hpp @@ -384,8 +384,8 @@ public: : sparse{allocator}, packed{allocator}, info{&elem}, - head{tombstone}, - mode{pol} {} + mode{pol}, + head{tombstone} {} /** * @brief Move constructor. @@ -395,8 +395,8 @@ public: : sparse{std::move(other.sparse)}, packed{std::move(other.packed)}, info{other.info}, - head{std::exchange(other.head, tombstone)}, - mode{other.mode} {} + mode{other.mode}, + head{std::exchange(other.head, tombstone)} {} /** * @brief Allocator-extended move constructor. @@ -407,8 +407,8 @@ public: : sparse{std::move(other.sparse), allocator}, packed{std::move(other.packed), allocator}, info{other.info}, - head{std::exchange(other.head, tombstone)}, - mode{other.mode} { + mode{other.mode}, + head{std::exchange(other.head, tombstone)} { ENTT_ASSERT(alloc_traits::is_always_equal::value || packed.get_allocator() == other.packed.get_allocator(), "Copying a sparse set is not allowed"); } @@ -429,8 +429,8 @@ public: sparse = std::move(other.sparse); packed = std::move(other.packed); info = other.info; - head = std::exchange(other.head, tombstone); mode = other.mode; + head = std::exchange(other.head, tombstone); return *this; } @@ -443,8 +443,8 @@ public: swap(sparse, other.sparse); swap(packed, other.packed); swap(info, other.info); - swap(head, other.head); swap(mode, other.mode); + swap(head, other.head); } /** @@ -1001,8 +1001,8 @@ private: sparse_container_type sparse; packed_container_type packed; const type_info *info; - entity_type head; deletion_policy mode; + entity_type head; }; } // namespace entt