Fixes spacing for "for", "while", "switch" and "if"

Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
This commit is contained in:
Matthew Parlane
2014-03-11 00:30:55 +13:00
parent 4591464486
commit 31cfc73a09
189 changed files with 1250 additions and 1159 deletions

View File

@ -184,9 +184,9 @@ void CCodeView::InsertBlrNop(int Blr)
{
// Check if this address has been modified
int find = -1;
for(u32 i = 0; i < BlrList.size(); i++)
for (u32 i = 0; i < BlrList.size(); i++)
{
if(BlrList.at(i).Address == selection)
if (BlrList.at(i).Address == selection)
{
find = i;
break;

View File

@ -207,7 +207,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
}
wxString OpenCommand;
OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
if(!OpenCommand.IsEmpty())
if (!OpenCommand.IsEmpty())
wxExecute(OpenCommand, wxEXEC_SYNC);
}
}
@ -227,7 +227,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
switch (event.GetId())
{
case IDM_CLEARSYMBOLS:
if(!AskYesNo("Do you want to clear the list of symbol names?")) return;
if (!AskYesNo("Do you want to clear the list of symbol names?")) return;
g_symbolDB.Clear();
Host_NotifyMapLoaded();
break;
@ -381,9 +381,9 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
if (pSymbol != nullptr)
{
if(pSymbol->type == Symbol::SYMBOL_DATA)
if (pSymbol->type == Symbol::SYMBOL_DATA)
{
if(m_MemoryWindow)// && m_MemoryWindow->IsVisible())
if (m_MemoryWindow)// && m_MemoryWindow->IsVisible())
m_MemoryWindow->JumpToAddress(pSymbol->address);
}
else

View File

@ -83,9 +83,10 @@ void GFXDebuggerPanel::SaveSettings() const
// weird values, perhaps because of some conflict with the rendering window
// TODO: get the screen resolution and make limits from that
if (GetPosition().x < 1000 && GetPosition().y < 1000
&& GetSize().GetWidth() < 1000
&& GetSize().GetHeight() < 1000)
if (GetPosition().x < 1000 &&
GetPosition().y < 1000 &&
GetSize().GetWidth() < 1000 &&
GetSize().GetHeight() < 1000)
{
file.Set("VideoWindow", "x", GetPosition().x);
file.Set("VideoWindow", "y", GetPosition().y);

View File

@ -130,7 +130,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
void CMemoryWindow::Save(IniFile& _IniFile) const
{
// Prevent these bad values that can happen after a crash or hanging
if(GetPosition().x != -32000 && GetPosition().y != -32000)
if (GetPosition().x != -32000 && GetPosition().y != -32000)
{
_IniFile.Set("MemoryWindow", "x", GetPosition().x);
_IniFile.Set("MemoryWindow", "y", GetPosition().y);
@ -356,7 +356,7 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
strcat(tmpstr, WxStrToStr(rawData).c_str());
tmp2 = &Dest.front();
count = 0;
for(i = 0; i < strlen(tmpstr); i++)
for (i = 0; i < strlen(tmpstr); i++)
{
copy[0] = tmpstr[i];
copy[1] = tmpstr[i+1];
@ -381,13 +381,13 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
tmp2 = &Dest.front();
sprintf(tmpstr, "%s", WxStrToStr(rawData).c_str());
for(i = 0; i < size; i++)
for (i = 0; i < size; i++)
tmp2[i] = tmpstr[i];
delete[] tmpstr;
}
if(size)
if (size)
{
unsigned char* pnt = &Dest.front();
unsigned int k = 0;
@ -399,19 +399,19 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
sscanf(WxStrToStr(txt).c_str(), "%08x", &addr);
}
i = addr+4;
for( ; i < szRAM; i++)
for ( ; i < szRAM; ++i)
{
for(k = 0; k < size; k++)
for (k = 0; k < size; ++k)
{
if(i + k > szRAM) break;
if(k > size) break;
if(pnt[k] != TheRAM[i+k])
if (i + k > szRAM) break;
if (k > size) break;
if (pnt[k] != TheRAM[i+k])
{
k = 0;
break;
}
}
if(k == size)
if (k == size)
{
//Match was found
wxMessageBox(_("A match was found. Placing viewer at the offset."));