From 734e0bc0e8dd588a41db13fe8dbb788e25fe26f9 Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Wed, 17 Apr 2019 20:05:27 -0400 Subject: [PATCH] Code style fixes. --- Source/MA_MIPSIV.cpp | 2 +- Source/MA_MIPSIV_Templates.cpp | 31 +++++++++++++++---------------- Source/MIPS.cpp | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Source/MA_MIPSIV.cpp b/Source/MA_MIPSIV.cpp index 0b621755..2d6ef6d1 100644 --- a/Source/MA_MIPSIV.cpp +++ b/Source/MA_MIPSIV.cpp @@ -7,6 +7,7 @@ #include "offsetof_def.h" #include "placeholder_def.h" +// clang-format off const CMA_MIPSIV::MemoryAccessTraits CMA_MIPSIV::g_byteAccessTraits = { reinterpret_cast(&MemoryUtils_GetByteProxy), @@ -57,7 +58,6 @@ const CMA_MIPSIV::MemoryAccessTraits CMA_MIPSIV::g_wordAccessTraits = 4 }; -// clang-format off static const uint32 g_LWMaskRight[4] = { 0x00FFFFFF, diff --git a/Source/MA_MIPSIV_Templates.cpp b/Source/MA_MIPSIV_Templates.cpp index 9377f67d..a4b40406 100644 --- a/Source/MA_MIPSIV_Templates.cpp +++ b/Source/MA_MIPSIV_Templates.cpp @@ -70,23 +70,22 @@ void CMA_MIPSIV::Template_Load32(const MemoryAccessTraits& traits) if(m_nRT == 0) return; const auto finishLoad = - [&] () - { - if(traits.signExtFunction) - { - //SignExt to 32-bits (if needed) - ((m_codeGen)->*(traits.signExtFunction))(); - } + [&]() { + if(traits.signExtFunction) + { + //SignExt to 32-bits (if needed) + ((m_codeGen)->*(traits.signExtFunction))(); + } - //Sign extend to whole 64-bits - if(m_regSize == MIPS_REGSIZE_64) - { - m_codeGen->PushTop(); - m_codeGen->SignExt(); - m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[1])); - } - m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[0])); - }; + //Sign extend to whole 64-bits + if(m_regSize == MIPS_REGSIZE_64) + { + m_codeGen->PushTop(); + m_codeGen->SignExt(); + m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[1])); + } + m_codeGen->PullRel(offsetof(CMIPS, m_State.nGPR[m_nRT].nV[0])); + }; bool usePageLookup = (m_pCtx->m_pageLookup != nullptr); diff --git a/Source/MIPS.cpp b/Source/MIPS.cpp index 78103f54..b27d54ac 100644 --- a/Source/MIPS.cpp +++ b/Source/MIPS.cpp @@ -48,7 +48,7 @@ CMIPS::~CMIPS() { delete m_pMemoryMap; delete m_analysis; - delete [] m_pageLookup; + delete[] m_pageLookup; } void CMIPS::Reset()