From 7780af56e3266007ebec304e1a5e54bb03aae155 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 2 Apr 2018 13:58:35 -0400 Subject: [PATCH] ir_emitter: Make immediate member functions const qualified These don't modify class state --- src/frontend/ir/ir_emitter.cpp | 10 +++++----- src/frontend/ir/ir_emitter.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/frontend/ir/ir_emitter.cpp b/src/frontend/ir/ir_emitter.cpp index 285e2aff..80ca0b4a 100644 --- a/src/frontend/ir/ir_emitter.cpp +++ b/src/frontend/ir/ir_emitter.cpp @@ -10,23 +10,23 @@ namespace Dynarmic::IR { -U1 IREmitter::Imm1(bool imm1) { +U1 IREmitter::Imm1(bool imm1) const { return U1(Value(imm1)); } -U8 IREmitter::Imm8(u8 imm8) { +U8 IREmitter::Imm8(u8 imm8) const { return U8(Value(imm8)); } -U16 IREmitter::Imm16(u16 imm16) { +U16 IREmitter::Imm16(u16 imm16) const { return U16(Value(imm16)); } -U32 IREmitter::Imm32(u32 imm32) { +U32 IREmitter::Imm32(u32 imm32) const { return U32(Value(imm32)); } -U64 IREmitter::Imm64(u64 imm64) { +U64 IREmitter::Imm64(u64 imm64) const { return U64(Value(imm64)); } diff --git a/src/frontend/ir/ir_emitter.h b/src/frontend/ir/ir_emitter.h index fbaed83e..93945565 100644 --- a/src/frontend/ir/ir_emitter.h +++ b/src/frontend/ir/ir_emitter.h @@ -59,11 +59,11 @@ public: Block& block; - U1 Imm1(bool value); - U8 Imm8(u8 value); - U16 Imm16(u16 value); - U32 Imm32(u32 value); - U64 Imm64(u64 value); + U1 Imm1(bool value) const; + U8 Imm8(u8 value) const; + U16 Imm16(u16 value) const; + U32 Imm32(u32 value) const; + U64 Imm64(u64 value) const; void PushRSB(const LocationDescriptor& return_location);