From 79865e295b5efe0b053dbb4c060c75e034e8f1c5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 4 Mar 2024 12:20:40 -0500 Subject: [PATCH] Avoid ambiguous template parameter; use standard type. --- InstructionSets/ARM/Registers.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/InstructionSets/ARM/Registers.hpp b/InstructionSets/ARM/Registers.hpp index a2c410268..9278acb40 100644 --- a/InstructionSets/ARM/Registers.hpp +++ b/InstructionSets/ARM/Registers.hpp @@ -140,14 +140,14 @@ struct Registers { }; /// Updates the program counter, interupt flags and link register if applicable to begin @c exception. - template + template void exception() { interrupt_flags_ |= ConditionCode::IRQDisable; - if constexpr (exception == Exception::Reset || exception == Exception::FIQ) { + if constexpr (type == Exception::Reset || type == Exception::FIQ) { interrupt_flags_ |= ConditionCode::FIQDisable; } - switch(exception) { + switch(type) { case Exception::IRQ: set_mode(Mode::IRQ); active_[14] = pc(8); @@ -262,11 +262,11 @@ struct Registers { mode_ = target_mode; } - uint32_t &operator[](int offset) { + uint32_t &operator[](size_t offset) { return active_[offset]; } - const uint32_t operator[](int offset) const { + const uint32_t operator[](size_t offset) const { return active_[offset]; }