Browse Source

mixin: avoid use-after-move (wrong) warnings

Michele Caini 1 year ago
parent
commit
a5d4611d21
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/entt/entity/mixin.hpp

+ 4 - 0
src/entt/entity/mixin.hpp

@@ -454,22 +454,26 @@ public:
      * @brief Move constructor.
      * @param other The instance to move from.
      */
+    // NOLINTBEGIN(bugprone-use-after-move)
     basic_reactive_mixin(basic_reactive_mixin &&other) noexcept
         : underlying_type{std::move(other)},
           owner{other.owner},
           conn{} {
     }
+    // NOLINTEND(bugprone-use-after-move)
 
     /**
      * @brief Allocator-extended move constructor.
      * @param other The instance to move from.
      * @param allocator The allocator to use.
      */
+    // NOLINTBEGIN(bugprone-use-after-move)
     basic_reactive_mixin(basic_reactive_mixin &&other, const allocator_type &allocator)
         : underlying_type{std::move(other), allocator},
           owner{other.owner},
           conn{allocator} {
     }
+    // NOLINTEND(bugprone-use-after-move)
 
     /*! @brief Default destructor. */
     ~basic_reactive_mixin() override = default;