From 1f14b7f9074c4f3f11d9ccd2c3847ada14a9adcb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 7 Feb 2017 14:57:39 -0500 Subject: [PATCH] EXI_DeviceAD16: Amend variable naming Drops Hungarian Notation type prefixing and prefixed underscores. --- Source/Core/Core/HW/EXI/EXI_DeviceAD16.cpp | 52 +++++++++++----------- Source/Core/Core/HW/EXI/EXI_DeviceAD16.h | 12 ++--- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceAD16.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceAD16.cpp index d14630ba24..159964129b 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceAD16.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceAD16.cpp @@ -13,7 +13,7 @@ CEXIAD16::CEXIAD16() = default; void CEXIAD16::SetCS(int cs) { if (cs) - m_uPosition = 0; + m_position = 0; } bool CEXIAD16::IsPresent() const @@ -21,35 +21,35 @@ bool CEXIAD16::IsPresent() const return true; } -void CEXIAD16::TransferByte(u8& _byte) +void CEXIAD16::TransferByte(u8& byte) { - if (m_uPosition == 0) + if (m_position == 0) { - m_uCommand = _byte; + m_command = byte; } else { - switch (m_uCommand) + switch (m_command) { case init: { - m_uAD16Register.U32 = 0x04120000; - switch (m_uPosition) + m_ad16_register.U32 = 0x04120000; + switch (m_position) { case 1: - _dbg_assert_(EXPANSIONINTERFACE, (_byte == 0x00)); + _dbg_assert_(EXPANSIONINTERFACE, byte == 0x00); break; // just skip case 2: - _byte = m_uAD16Register.U8[0]; + byte = m_ad16_register.U8[0]; break; case 3: - _byte = m_uAD16Register.U8[1]; + byte = m_ad16_register.U8[1]; break; case 4: - _byte = m_uAD16Register.U8[2]; + byte = m_ad16_register.U8[2]; break; case 5: - _byte = m_uAD16Register.U8[3]; + byte = m_ad16_register.U8[3]; break; } } @@ -57,19 +57,19 @@ void CEXIAD16::TransferByte(u8& _byte) case write: { - switch (m_uPosition) + switch (m_position) { case 1: - m_uAD16Register.U8[0] = _byte; + m_ad16_register.U8[0] = byte; break; case 2: - m_uAD16Register.U8[1] = _byte; + m_ad16_register.U8[1] = byte; break; case 3: - m_uAD16Register.U8[2] = _byte; + m_ad16_register.U8[2] = byte; break; case 4: - m_uAD16Register.U8[3] = _byte; + m_ad16_register.U8[3] = byte; break; } } @@ -77,19 +77,19 @@ void CEXIAD16::TransferByte(u8& _byte) case read: { - switch (m_uPosition) + switch (m_position) { case 1: - _byte = m_uAD16Register.U8[0]; + byte = m_ad16_register.U8[0]; break; case 2: - _byte = m_uAD16Register.U8[1]; + byte = m_ad16_register.U8[1]; break; case 3: - _byte = m_uAD16Register.U8[2]; + byte = m_ad16_register.U8[2]; break; case 4: - _byte = m_uAD16Register.U8[3]; + byte = m_ad16_register.U8[3]; break; } } @@ -97,12 +97,12 @@ void CEXIAD16::TransferByte(u8& _byte) } } - m_uPosition++; + m_position++; } void CEXIAD16::DoState(PointerWrap& p) { - p.Do(m_uPosition); - p.Do(m_uCommand); - p.Do(m_uAD16Register); + p.Do(m_position); + p.Do(m_command); + p.Do(m_ad16_register); } diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceAD16.h b/Source/Core/Core/HW/EXI/EXI_DeviceAD16.h index 240464ae37..5b36bf078e 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceAD16.h +++ b/Source/Core/Core/HW/EXI/EXI_DeviceAD16.h @@ -12,7 +12,7 @@ class CEXIAD16 : public IEXIDevice { public: CEXIAD16(); - void SetCS(int _iCS) override; + void SetCS(int cs) override; bool IsPresent() const override; void DoState(PointerWrap& p) override; @@ -24,16 +24,16 @@ private: read = 0xa2 }; - union UAD16Reg + union AD16Reg { u32 U32 = 0; u32 U8[4]; }; // STATE_TO_SAVE - u32 m_uPosition = 0; - u32 m_uCommand = 0; - UAD16Reg m_uAD16Register; + u32 m_position = 0; + u32 m_command = 0; + AD16Reg m_ad16_register; - void TransferByte(u8& _uByte) override; + void TransferByte(u8& byte) override; };