From a5d4611d21a80b464a5ede17fa90523f136469d8 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 27 Jan 2025 10:08:08 +0100 Subject: [PATCH] mixin: avoid use-after-move (wrong) warnings --- src/entt/entity/mixin.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/entt/entity/mixin.hpp b/src/entt/entity/mixin.hpp index b986a9428..16d4eed3b 100644 --- a/src/entt/entity/mixin.hpp +++ b/src/entt/entity/mixin.hpp @@ -454,22 +454,26 @@ class basic_reactive_mixin final: public Type { * @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;