summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-10-06 12:47:57 -0400
committerLioncash <mathew1800@gmail.com>2016-10-06 13:02:49 -0400
commit2ba0d6eb77eb1542a68d5a3998531578b4782b25 (patch)
tree45d81ed967301fc6b257dcde5a3b202f62db536f /Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
parent5dedd0a85b01548378c2765eb1e557301f09ba61 (diff)
DSPRegisterView: Get rid of magic numbers
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
index 4f0d6fb2d3..65fdc2b9ca 100644
--- a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
+++ b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
@@ -13,7 +13,7 @@
wxString CDSPRegTable::GetValue(int row, int col)
{
- if (row < 32) // 32 "normal" regs
+ if (row < GetNumberRows())
{
switch (col)
{
@@ -41,10 +41,12 @@ void CDSPRegTable::UpdateCachedRegs()
m_CachedCounter = g_dsp.step_counter;
- for (int i = 0; i < 32; ++i)
+ for (size_t i = 0; i < m_CachedRegs.size(); ++i)
{
- m_CachedRegHasChanged[i] = (m_CachedRegs[i] != DSPCore_ReadRegister(i));
- m_CachedRegs[i] = DSPCore_ReadRegister(i);
+ const u16 value = DSPCore_ReadRegister(i);
+
+ m_CachedRegHasChanged[i] = m_CachedRegs[i] != value;
+ m_CachedRegs[i] = value;
}
}