From d059e7c5d8161af185009a444e0f2084478e4809 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 9 Mar 2024 15:10:55 -0500 Subject: [PATCH] Disallow copying. --- InstructionSets/ARM/Registers.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InstructionSets/ARM/Registers.hpp b/InstructionSets/ARM/Registers.hpp index 41cfe429a..fa3d05925 100644 --- a/InstructionSets/ARM/Registers.hpp +++ b/InstructionSets/ARM/Registers.hpp @@ -46,6 +46,11 @@ enum class Mode { /// This is to try to keep this structure independent of a specific ARM implementation. struct Registers { public: + // Don't allow copying. + Registers(const Registers &) = delete; + Registers &operator =(const Registers &) = delete; + Registers() = default; + /// Sets the N and Z flags according to the value of @c result. void set_nz(uint32_t value) { zero_result_ = negative_flag_ = value;