diff --git a/src/backend_x64/interface_x64.cpp b/src/backend_x64/interface_x64.cpp index cab0a342..eb99f78f 100644 --- a/src/backend_x64/interface_x64.cpp +++ b/src/backend_x64/interface_x64.cpp @@ -144,7 +144,7 @@ void Jit::HaltExecution() { std::array& Jit::Regs() { return impl->jit_state.Reg; } -std::array Jit::Regs() const { +const std::array& Jit::Regs() const { return impl->jit_state.Reg; } @@ -152,7 +152,7 @@ std::array& Jit::ExtRegs() { return impl->jit_state.ExtReg; } -std::array Jit::ExtRegs() const { +const std::array& Jit::ExtRegs() const { return impl->jit_state.ExtReg; } diff --git a/src/interface/interface.h b/src/interface/interface.h index b790b110..a3abdd21 100644 --- a/src/interface/interface.h +++ b/src/interface/interface.h @@ -72,9 +72,9 @@ public: /// View and modify registers. std::array& Regs(); - std::array Regs() const; + const std::array& Regs() const; std::array& ExtRegs(); - std::array ExtRegs() const; + const std::array& ExtRegs() const; /// View and modify CPSR. u32& Cpsr();