Remove all tab/space mismatches from the DolphinWX project (at least 99%. I promise!)

Also fix up the dangling else's. Shit just looks incredibly ugly in terms of actual structure in the code.

I took the liberty of adding comments in FifoPlayerDlg.cpp, LogConfigWindow.cpp, LogWindow.cpp, and FrameAui.cpp to better explain some things.

If any comments are wrong, don't hesitate to complain.
This commit is contained in:
Lioncash
2013-04-08 01:16:50 -04:00
parent 5b2d9a7d9f
commit 1db10b139c
36 changed files with 584 additions and 295 deletions

View File

@ -138,16 +138,16 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
{
switch (event.GetId())
{
case IDM_NOTIFYMAPLOADED:
NotifyMapLoaded();
case IDM_NOTIFYMAPLOADED:
NotifyMapLoaded();
if (m_BreakpointWindow) m_BreakpointWindow->NotifyUpdate();
break;
break;
case IDM_UPDATEDISASMDIALOG:
Update();
case IDM_UPDATEDISASMDIALOG:
Update();
if (codeview) codeview->Center(PC);
if (m_RegisterWindow) m_RegisterWindow->NotifyUpdate();
break;
if (m_RegisterWindow) m_RegisterWindow->NotifyUpdate();
break;
case IDM_UPDATEBREAKPOINTS:
Update();
@ -161,31 +161,31 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
{
switch (event.GetId())
{
case IDM_STEP:
case IDM_STEP:
SingleStep();
break;
break;
case IDM_STEPOVER:
case IDM_STEPOVER:
StepOver();
break;
break;
case IDM_TOGGLE_BREAKPOINT:
ToggleBreakpoint();
break;
case IDM_SKIP:
PC += 4;
Update();
break;
case IDM_SKIP:
PC += 4;
Update();
break;
case IDM_SETPC:
PC = codeview->GetSelection();
Update();
break;
case IDM_SETPC:
PC = codeview->GetSelection();
Update();
break;
case IDM_GOTOPC:
JumpToAddress(PC);
break;
case IDM_GOTOPC:
JumpToAddress(PC);
break;
}
UpdateButtonStates();
@ -227,7 +227,7 @@ void CCodeWindow::OnCallstackListChange(wxCommandEvent& event)
{
int index = callstack->GetSelection();
if (index >= 0)
{
{
u32 address = (u32)(u64)(callstack->GetClientData(index));
if (address)
JumpToAddress(address);
@ -238,7 +238,7 @@ void CCodeWindow::OnCallersListChange(wxCommandEvent& event)
{
int index = callers->GetSelection();
if (index >= 0)
{
{
u32 address = (u32)(u64)(callers->GetClientData(index));
if (address)
JumpToAddress(address);
@ -249,7 +249,7 @@ void CCodeWindow::OnCallsListChange(wxCommandEvent& event)
{
int index = calls->GetSelection();
if (index >= 0)
{
{
u32 address = (u32)(u64)(calls->GetClientData(index));
if (address)
JumpToAddress(address);
@ -283,7 +283,9 @@ void CCodeWindow::StepOver()
Update();
}
else
{
SingleStep();
}
UpdateButtonStates();
// Update all toolbars in the aui manager
@ -307,12 +309,13 @@ void CCodeWindow::UpdateLists()
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(addr);
if (!symbol)
return;
for (int i = 0; i < (int)symbol->callers.size(); i++)
{
u32 caller_addr = symbol->callers[i].callAddress;
Symbol *caller_symbol = g_symbolDB.GetSymbolFromAddr(caller_addr);
if (caller_symbol)
{
{
int idx = callers->Append(StrToWxStr(StringFromFormat
("< %s (%08x)", caller_symbol->name.c_str(), caller_addr).c_str()));
callers->SetClientData(idx, (void*)(u64)caller_addr);
@ -325,7 +328,7 @@ void CCodeWindow::UpdateLists()
u32 call_addr = symbol->calls[i].function;
Symbol *call_symbol = g_symbolDB.GetSymbolFromAddr(call_addr);
if (call_symbol)
{
{
int idx = calls->Append(StrToWxStr(StringFromFormat
("> %s (%08x)", call_symbol->name.c_str(), call_addr).c_str()));
calls->SetClientData(idx, (void*)(u64)call_addr);
@ -354,8 +357,7 @@ void CCodeWindow::UpdateCallstack()
}
// Create CPU Mode menus
void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter,
wxMenuBar *pMenuBar)
void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar)
{
// CPU Mode
wxMenu* pCoreMenu = new wxMenu;
@ -386,7 +388,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
_("Turn off all JIT functions, but still use the JIT core from Jit.cpp"),
wxITEM_CHECK);
pCoreMenu->Append(IDM_JITLSOFF, _("&JIT LoadStore off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITLSLBZXOFF, _(" &JIT LoadStore lbzx off"),
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITLSLXZOFF, _(" &JIT LoadStore lXz off"),
@ -394,17 +396,17 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
pCoreMenu->Append(IDM_JITLSLWZOFF, _("&JIT LoadStore lwz off"),
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITLSFOFF, _("&JIT LoadStore Floating off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITLSPOFF, _("&JIT LoadStore Paired off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITFPOFF, _("&JIT FloatingPoint off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITIOFF, _("&JIT Integer off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITPOFF, _("&JIT Paired off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pCoreMenu->Append(IDM_JITSROFF, _("&JIT SystemRegisters off"),
wxEmptyString, wxITEM_CHECK);
wxEmptyString, wxITEM_CHECK);
pMenuBar->Append(pCoreMenu, _("&JIT"));
@ -448,46 +450,46 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
{
case IDM_INTERPRETER:
PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT);
break;
break;
case IDM_BOOTTOPAUSE:
bBootToPause = !bBootToPause;
return;
return;
case IDM_AUTOMATICSTART:
bAutomaticStart = !bAutomaticStart;
return;
return;
case IDM_JITOFF:
Core::g_CoreStartupParameter.bJITOff = event.IsChecked();
break;
break;
case IDM_JITLSOFF:
Core::g_CoreStartupParameter.bJITLoadStoreOff = event.IsChecked();
break;
break;
case IDM_JITLSLXZOFF:
Core::g_CoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked();
break;
break;
case IDM_JITLSLWZOFF:
Core::g_CoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked();
break;
break;
case IDM_JITLSLBZXOFF:
Core::g_CoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked();
break;
break;
case IDM_JITLSFOFF:
Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked();
break;
break;
case IDM_JITLSPOFF:
Core::g_CoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked();
break;
break;
case IDM_JITFPOFF:
Core::g_CoreStartupParameter.bJITFloatingPointOff = event.IsChecked();
break;
break;
case IDM_JITIOFF:
Core::g_CoreStartupParameter.bJITIntegerOff = event.IsChecked();
break;
break;
case IDM_JITPOFF:
Core::g_CoreStartupParameter.bJITPairedOff = event.IsChecked();
break;
break;
case IDM_JITSROFF:
Core::g_CoreStartupParameter.bJITSystemRegistersOff = event.IsChecked();
break;
break;
}
// Clear the JIT cache to enable these changes
@ -503,22 +505,22 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
{
case IDM_LOGINSTRUCTIONS:
PPCTables::LogCompiledInstructions();
break;
break;
case IDM_CLEARCODECACHE:
JitInterface::ClearCache();
break;
break;
case IDM_SEARCHINSTRUCTION:
{
wxString str;
str = wxGetTextFromUser(_T(""), wxT("Op?"), wxEmptyString, this);
for (u32 addr = 0x80000000; addr < 0x80100000; addr += 4)
{
{
const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr));
auto const wx_name = WxStrToStr(str);
if (name && (wx_name == name))
{
{
NOTICE_LOG(POWERPC, "Found %s at %08x", wx_name.c_str(), addr);
}
}
@ -575,10 +577,10 @@ void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar)
toolBar->SetToolBitmapSize(wxSize(w, h));
toolBar->AddTool(IDM_STEP, _("Step"), m_Bitmaps[Toolbar_Step]);
toolBar->AddTool(IDM_STEPOVER, _("Step Over"), m_Bitmaps[Toolbar_StepOver]);
toolBar->AddTool(IDM_STEPOVER, _("Step Over"), m_Bitmaps[Toolbar_StepOver]);
toolBar->AddTool(IDM_SKIP, _("Skip"), m_Bitmaps[Toolbar_Skip]);
toolBar->AddSeparator();
toolBar->AddTool(IDM_GOTOPC, _("Show PC"), m_Bitmaps[Toolbar_GotoPC]);
toolBar->AddTool(IDM_GOTOPC, _("Show PC"), m_Bitmaps[Toolbar_GotoPC]);
toolBar->AddTool(IDM_SETPC, _("Set PC"), m_Bitmaps[Toolbar_SetPC]);
toolBar->AddSeparator();
toolBar->AddControl(new wxTextCtrl(toolBar, IDM_ADDRBOX, _T("")));