interface: Return register files by const reference

Prevents unnecessary copies where they aren't particularly required.
This commit is contained in:
Lioncash 2016-08-24 20:01:42 -04:00 committed by MerryMage
parent 37755cbfec
commit 1395baefa9
2 changed files with 4 additions and 4 deletions

View file

@ -144,7 +144,7 @@ void Jit::HaltExecution() {
std::array<u32, 16>& Jit::Regs() {
return impl->jit_state.Reg;
}
std::array<u32, 16> Jit::Regs() const {
const std::array<u32, 16>& Jit::Regs() const {
return impl->jit_state.Reg;
}
@ -152,7 +152,7 @@ std::array<u32, 64>& Jit::ExtRegs() {
return impl->jit_state.ExtReg;
}
std::array<u32, 64> Jit::ExtRegs() const {
const std::array<u32, 64>& Jit::ExtRegs() const {
return impl->jit_state.ExtReg;
}

View file

@ -72,9 +72,9 @@ public:
/// View and modify registers.
std::array<u32, 16>& Regs();
std::array<u32, 16> Regs() const;
const std::array<u32, 16>& Regs() const;
std::array<u32, 64>& ExtRegs();
std::array<u32, 64> ExtRegs() const;
const std::array<u32, 64>& ExtRegs() const;
/// View and modify CPSR.
u32& Cpsr();