From cfd7513a7d8e102eb2cbb0722f0a94ec6bae44ec Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 11 Apr 2019 18:30:28 -0400 Subject: [PATCH] ir_opt/verification_pass: Mark locals as const where applicable Makes our immutable state a little more explicit. --- src/ir_opt/verification_pass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ir_opt/verification_pass.cpp b/src/ir_opt/verification_pass.cpp index ef590b45..ed99e127 100644 --- a/src/ir_opt/verification_pass.cpp +++ b/src/ir_opt/verification_pass.cpp @@ -19,8 +19,8 @@ namespace Dynarmic::Optimization { void VerificationPass(const IR::Block& block) { for (const auto& inst : block) { for (size_t i = 0; i < inst.NumArgs(); i++) { - IR::Type t1 = inst.GetArg(i).GetType(); - IR::Type t2 = IR::GetArgTypeOf(inst.GetOpcode(), i); + const IR::Type t1 = inst.GetArg(i).GetType(); + const IR::Type t2 = IR::GetArgTypeOf(inst.GetOpcode(), i); if (!IR::AreTypesCompatible(t1, t2)) { puts(IR::DumpBlock(block).c_str()); ASSERT(false);