From e5d7c0bd5d9aec44d68830187138149e6a8c4e32 Mon Sep 17 00:00:00 2001 From: kobalicek Date: Sun, 24 Mar 2024 23:55:38 +0100 Subject: [PATCH] Avoid using memcpy(this) to prevent possible warnings --- src/asmjit/core/operand.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/asmjit/core/operand.h b/src/asmjit/core/operand.h index 0fe71f5..8a1eee7 100644 --- a/src/asmjit/core/operand.h +++ b/src/asmjit/core/operand.h @@ -530,7 +530,12 @@ struct Operand_ { //! \endcond //! Initializes the operand from `other` operand (used by operator overloads). - ASMJIT_INLINE_NODEBUG void copyFrom(const Operand_& other) noexcept { memcpy(this, &other, sizeof(Operand_)); } + ASMJIT_INLINE_NODEBUG void copyFrom(const Operand_& other) noexcept { + _signature._bits = other._signature._bits; + _baseId = other._baseId; + _data[0] = other._data[0]; + _data[1] = other._data[1]; + } //! Resets the `Operand` to none. //!