From 95b73d94f75494af3d5ff84d140df99ab74be192 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 28 Nov 2023 08:03:53 +0100 Subject: [PATCH] storage: minor changes --- src/entt/entity/storage.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index 3cba2d4c1..e6e99f25c 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -241,8 +241,6 @@ class basic_storage: public basic_sparse_set>; using underlying_iterator = typename underlying_type::basic_iterator; - static constexpr bool is_pinned_type_v = !(std::is_move_constructible_v && std::is_move_assignable_v); - [[nodiscard]] auto &element_at(const std::size_t pos) const { return payload[pos / traits_type::page_size][fast_mod(pos, traits_type::page_size)]; } @@ -312,6 +310,7 @@ private: } void swap_or_move([[maybe_unused]] const std::size_t from, [[maybe_unused]] const std::size_t to) override { + static constexpr bool is_pinned_type_v = !(std::is_move_constructible_v && std::is_move_assignable_v); // use a runtime value to avoid compile-time suppression that drives the code coverage tool crazy ENTT_ASSERT((from + 1u) && !is_pinned_type_v, "Pinned type");