Browse Source

storage: minor changes

Michele Caini 2 years ago
parent
commit
95b73d94f7
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/entt/entity/storage.hpp

+ 1 - 2
src/entt/entity/storage.hpp

@@ -241,8 +241,6 @@ class basic_storage: public basic_sparse_set<Entity, typename std::allocator_tra
     using underlying_type = basic_sparse_set<Entity, typename alloc_traits::template rebind_alloc<Entity>>;
     using underlying_iterator = typename underlying_type::basic_iterator;
 
-    static constexpr bool is_pinned_type_v = !(std::is_move_constructible_v<Type> && std::is_move_assignable_v<Type>);
-
     [[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<Type> && std::is_move_assignable_v<Type>);
         // 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");