From 4cb70d3c2d807a86d7964fedbdbdb4ac336e1518 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 27 May 2024 11:44:27 +0200 Subject: [PATCH] mixin: avoid move/swap after move/swap --- src/entt/entity/mixin.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/mixin.hpp b/src/entt/entity/mixin.hpp index e1e83f7dd..6f45a92e2 100644 --- a/src/entt/entity/mixin.hpp +++ b/src/entt/entity/mixin.hpp @@ -152,11 +152,11 @@ public: * @return This mixin. */ basic_sigh_mixin &operator=(basic_sigh_mixin &&other) noexcept { - underlying_type::operator=(std::move(other)); owner = other.owner; construction = std::move(other.construction); destruction = std::move(other.destruction); update = std::move(other.update); + underlying_type::operator=(std::move(other)); return *this; } @@ -166,11 +166,11 @@ public: */ void swap(basic_sigh_mixin &other) { using std::swap; - underlying_type::swap(other); swap(owner, other.owner); swap(construction, other.construction); swap(destruction, other.destruction); swap(update, other.update); + underlying_type::swap(other); } /**