Jelajahi Sumber

storage: suppress wrong use-after-move warning

Michele Caini 1 tahun lalu
induk
melakukan
97befad59a
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      src/entt/entity/storage.hpp

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

@@ -456,6 +456,7 @@ public:
     basic_storage(basic_storage &&other, const allocator_type &allocator)
     basic_storage(basic_storage &&other, const allocator_type &allocator)
         : base_type{std::move(other), allocator},
         : base_type{std::move(other), allocator},
           payload{std::move(other.payload), allocator} {
           payload{std::move(other.payload), allocator} {
+        // NOLINTNEXTLINE(bugprone-use-after-move)
         ENTT_ASSERT(alloc_traits::is_always_equal::value || get_allocator() == other.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");
     }
     }