From 57ac4c0607eb18712358ec713b13879ed770e6dd Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 8 Jan 2018 18:20:56 +1100 Subject: [PATCH] [User Interface] Clean up Debugger/Debugger-AddBreakpoint.cpp --- .../Debugger/Debugger-AddBreakpoint.cpp | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-AddBreakpoint.cpp b/Source/Project64/UserInterface/Debugger/Debugger-AddBreakpoint.cpp index 6375ede04..6c712764f 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-AddBreakpoint.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-AddBreakpoint.cpp @@ -15,44 +15,44 @@ LRESULT CAddBreakpointDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { - CenterWindow(); - m_AddressEdit.Attach(GetDlgItem(IDC_ADDR_EDIT)); - m_ReadCheck.Attach(GetDlgItem(IDC_CHK_READ)); - m_WriteCheck.Attach(GetDlgItem(IDC_CHK_WRITE)); - m_ExecuteCheck.Attach(GetDlgItem(IDC_CHK_EXEC)); - return FALSE; + CenterWindow(); + m_AddressEdit.Attach(GetDlgItem(IDC_ADDR_EDIT)); + m_ReadCheck.Attach(GetDlgItem(IDC_CHK_READ)); + m_WriteCheck.Attach(GetDlgItem(IDC_CHK_WRITE)); + m_ExecuteCheck.Attach(GetDlgItem(IDC_CHK_EXEC)); + return FALSE; } LRESULT CAddBreakpointDlg::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND, BOOL& /*bHandled*/) { - switch (wID) - { - case IDOK: - { - char addrStr[9]; - m_AddressEdit.GetWindowTextA(addrStr, 9); - uint32_t address = strtoul(addrStr, NULL, 16); - - CBreakpoints* breakpoints = m_Debugger->Breakpoints(); + switch (wID) + { + case IDOK: + { + char addrStr[9]; + m_AddressEdit.GetWindowTextA(addrStr, 9); + uint32_t address = strtoul(addrStr, NULL, 16); - if (m_ReadCheck.GetCheck()) - { - breakpoints->RBPAdd(address); - } - if (m_WriteCheck.GetCheck()) - { - breakpoints->WBPAdd(address); - } - if (m_ExecuteCheck.GetCheck()) - { - breakpoints->AddExecution(address); - } - EndDialog(0); - break; - } - case IDCANCEL: - EndDialog(0); - break; - } - return FALSE; + CBreakpoints* breakpoints = m_Debugger->Breakpoints(); + + if (m_ReadCheck.GetCheck()) + { + breakpoints->RBPAdd(address); + } + if (m_WriteCheck.GetCheck()) + { + breakpoints->WBPAdd(address); + } + if (m_ExecuteCheck.GetCheck()) + { + breakpoints->AddExecution(address); + } + EndDialog(0); + break; + } + case IDCANCEL: + EndDialog(0); + break; + } + return FALSE; } \ No newline at end of file