From 028028f9ebc327182ffb05b89e3e3d62e8ed2829 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Sep 2018 21:07:02 -0400 Subject: [PATCH] data_processing_conditional_select: Make variables const where applicable Makes CSEL's function consistent with all of the others. --- .../impl/data_processing_conditional_select.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp b/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp index 5d1c531b..f241368d 100644 --- a/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp +++ b/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp @@ -9,15 +9,14 @@ namespace Dynarmic::A64 { bool TranslatorVisitor::CSEL(bool sf, Reg Rm, Cond cond, Reg Rn, Reg Rd) { - size_t datasize = sf ? 64 : 32; + const size_t datasize = sf ? 64 : 32; - IR::U32U64 operand1 = X(datasize, Rn); - IR::U32U64 operand2 = X(datasize, Rm); + const IR::U32U64 operand1 = X(datasize, Rn); + const IR::U32U64 operand2 = X(datasize, Rm); - IR::U32U64 result = ir.ConditionalSelect(cond, operand1, operand2); + const IR::U32U64 result = ir.ConditionalSelect(cond, operand1, operand2); X(datasize, Rd, result); - return true; }