mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
@ -335,7 +335,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
|
||||
void CCodeView::OnMouseUpR(wxMouseEvent& event)
|
||||
{
|
||||
bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != 0;
|
||||
bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != nullptr;
|
||||
// popup menu
|
||||
wxMenu* menu = new wxMenu;
|
||||
//menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view");
|
||||
@ -482,7 +482,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
mojs = 0;
|
||||
mojs = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,13 +89,13 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
||||
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
|
||||
: wxPanel((wxWindow*)parent, id, position, size, style, name)
|
||||
, Parent(parent)
|
||||
, m_RegisterWindow(NULL)
|
||||
, m_BreakpointWindow(NULL)
|
||||
, m_MemoryWindow(NULL)
|
||||
, m_JitWindow(NULL)
|
||||
, m_SoundWindow(NULL)
|
||||
, m_VideoWindow(NULL)
|
||||
, codeview(NULL)
|
||||
, m_RegisterWindow(nullptr)
|
||||
, m_BreakpointWindow(nullptr)
|
||||
, m_MemoryWindow(nullptr)
|
||||
, m_JitWindow(nullptr)
|
||||
, m_SoundWindow(nullptr)
|
||||
, m_VideoWindow(nullptr)
|
||||
, codeview(nullptr)
|
||||
{
|
||||
InitBitmaps();
|
||||
|
||||
@ -111,11 +111,11 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
||||
sizerLeft->Add(callstack = new wxListBox(this, ID_CALLSTACKLIST,
|
||||
wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
|
||||
sizerLeft->Add(symbols = new wxListBox(this, ID_SYMBOLLIST,
|
||||
wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);
|
||||
wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 1, wxEXPAND);
|
||||
sizerLeft->Add(calls = new wxListBox(this, ID_CALLSLIST, wxDefaultPosition,
|
||||
wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||
wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
|
||||
sizerLeft->Add(callers = new wxListBox(this, ID_CALLERSLIST, wxDefaultPosition,
|
||||
wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||
wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
|
||||
|
||||
SetSizer(sizerBig);
|
||||
|
||||
|
@ -180,7 +180,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
||||
{
|
||||
case IDM_PROFILEBLOCKS:
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
if (jit != NULL)
|
||||
if (jit != nullptr)
|
||||
jit->ClearCache();
|
||||
Profiler::g_ProfileBlocks = GetMenuBar()->IsChecked(IDM_PROFILEBLOCKS);
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
@ -191,13 +191,13 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
||||
|
||||
if (Core::GetState() == Core::CORE_PAUSE && PowerPC::GetMode() == PowerPC::MODE_JIT)
|
||||
{
|
||||
if (jit != NULL)
|
||||
if (jit != nullptr)
|
||||
{
|
||||
std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt";
|
||||
File::CreateFullPath(filename);
|
||||
Profiler::WriteProfileResults(filename.c_str());
|
||||
|
||||
wxFileType* filetype = NULL;
|
||||
wxFileType* filetype = nullptr;
|
||||
if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt"))))
|
||||
{
|
||||
// From extension failed, trying with MIME type now
|
||||
@ -379,7 +379,7 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
int index = symbols->GetSelection();
|
||||
if (index >= 0) {
|
||||
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
if(pSymbol->type == Symbol::SYMBOL_DATA)
|
||||
{
|
||||
@ -456,7 +456,7 @@ void CCodeWindow::ToggleRegisterWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_RegisterWindow, false);
|
||||
m_RegisterWindow = NULL;
|
||||
m_RegisterWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -474,7 +474,7 @@ void CCodeWindow::ToggleBreakPointWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_BreakpointWindow, false);
|
||||
m_BreakpointWindow = NULL;
|
||||
m_BreakpointWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ void CCodeWindow::ToggleMemoryWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_MemoryWindow, false);
|
||||
m_MemoryWindow = NULL;
|
||||
m_MemoryWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_JitWindow, false);
|
||||
m_JitWindow = NULL;
|
||||
m_JitWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -529,7 +529,7 @@ void CCodeWindow::ToggleSoundWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_SoundWindow, false);
|
||||
m_SoundWindow = NULL;
|
||||
m_SoundWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -547,6 +547,6 @@ void CCodeWindow::ToggleVideoWindow(bool bShow)
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_VideoWindow, false);
|
||||
m_VideoWindow = NULL;
|
||||
m_VideoWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
class wxWindow;
|
||||
|
||||
DSPDebuggerLLE* m_DebuggerFrame = NULL;
|
||||
DSPDebuggerLLE* m_DebuggerFrame = nullptr;
|
||||
|
||||
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
|
||||
EVT_CLOSE(DSPDebuggerLLE::OnClose)
|
||||
@ -69,7 +69,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
m_Toolbar->Realize();
|
||||
|
||||
m_SymbolList = new wxListBox(this, ID_SYMBOLLIST, wxDefaultPosition,
|
||||
wxSize(140, 100), 0, NULL, wxLB_SORT);
|
||||
wxSize(140, 100), 0, nullptr, wxLB_SORT);
|
||||
|
||||
m_MainNotebook = new wxAuiNotebook(this, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
@ -118,7 +118,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
DSPDebuggerLLE::~DSPDebuggerLLE()
|
||||
{
|
||||
m_mgr.UnInit();
|
||||
m_DebuggerFrame = NULL;
|
||||
m_DebuggerFrame = nullptr;
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::OnClose(wxCloseEvent& event)
|
||||
@ -217,7 +217,7 @@ void DSPDebuggerLLE::UpdateDisAsmListView()
|
||||
|
||||
void DSPDebuggerLLE::UpdateSymbolMap()
|
||||
{
|
||||
if (g_dsp.dram == NULL)
|
||||
if (g_dsp.dram == nullptr)
|
||||
return;
|
||||
|
||||
m_SymbolList->Freeze(); // HyperIris: wx style fast filling
|
||||
@ -235,7 +235,7 @@ void DSPDebuggerLLE::OnSymbolListChange(wxCommandEvent& event)
|
||||
int index = m_SymbolList->GetSelection();
|
||||
if (index >= 0) {
|
||||
Symbol* pSymbol = static_cast<Symbol *>(m_SymbolList->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
if (pSymbol->type == Symbol::SYMBOL_FUNCTION)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin
|
||||
|
||||
GFXDebuggerPanel::~GFXDebuggerPanel()
|
||||
{
|
||||
g_pdebugger = NULL;
|
||||
g_pdebugger = nullptr;
|
||||
GFXDebuggerPauseFlag = false;
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
|
||||
m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count"));
|
||||
|
||||
m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, NULL,0,wxDefaultValidator, _("PauseAtList"));
|
||||
m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList"));
|
||||
for (int i=0; i<numPauseEventMap; i++)
|
||||
{
|
||||
m_pPauseAtList->Append(pauseEventMap[i].ListStr);
|
||||
@ -168,7 +168,7 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders"));
|
||||
m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders"));
|
||||
|
||||
m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, NULL, 0 ,wxDefaultValidator, _("DumpList"));
|
||||
m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, nullptr, 0 ,wxDefaultValidator, _("DumpList"));
|
||||
m_pDumpList->Insert(_("Pixel Shader"),0);
|
||||
m_pDumpList->Append(_("Vertex Shader"));
|
||||
m_pDumpList->Append(_("Pixel Shader Constants"));
|
||||
|
@ -213,10 +213,10 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||
hFont.SetFamily(wxFONTFAMILY_TELETYPE);
|
||||
|
||||
wxCoord w,h;
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&hFont);
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&hFont);
|
||||
if (h > rowHeight)
|
||||
rowHeight = h;
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&DebuggerFont);
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&DebuggerFont);
|
||||
if (h > rowHeight)
|
||||
rowHeight = h;
|
||||
|
||||
|
@ -87,7 +87,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
||||
DebugInterface* di = &PowerPC::debug_interface;
|
||||
|
||||
//symbols = new wxListBox(this, IDM_SYMBOLLIST, wxDefaultPosition,
|
||||
// wxSize(20, 100), 0, NULL, wxLB_SORT);
|
||||
// wxSize(20, 100), 0, nullptr, wxLB_SORT);
|
||||
//sizerLeft->Add(symbols, 1, wxEXPAND);
|
||||
memview = new CMemoryView(di, this);
|
||||
memview->dataType = 0;
|
||||
@ -220,7 +220,7 @@ void CMemoryWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
if (index >= 0)
|
||||
{
|
||||
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
memview->Center(pSymbol->address);
|
||||
}
|
||||
@ -297,7 +297,7 @@ void CMemoryWindow::U32(wxCommandEvent& event)
|
||||
|
||||
void CMemoryWindow::onSearch(wxCommandEvent& event)
|
||||
{
|
||||
u8* TheRAM = 0;
|
||||
u8* TheRAM = nullptr;
|
||||
u32 szRAM = 0;
|
||||
switch (memview->GetMemoryType())
|
||||
{
|
||||
@ -331,8 +331,8 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
|
||||
long count = 0;
|
||||
char copy[3] = {0};
|
||||
long newsize = 0;
|
||||
unsigned char *tmp2 = 0;
|
||||
char* tmpstr = 0;
|
||||
unsigned char *tmp2 = nullptr;
|
||||
char* tmpstr = nullptr;
|
||||
|
||||
if (chkHex->GetValue())
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& position, const wxSize& size,
|
||||
long style, const wxString& name)
|
||||
: wxPanel(parent, id, position, size, style, name)
|
||||
, m_GPRGridView(NULL)
|
||||
, m_GPRGridView(nullptr)
|
||||
{
|
||||
CreateGUIControls();
|
||||
}
|
||||
@ -43,6 +43,6 @@ void CRegisterWindow::CreateGUIControls()
|
||||
|
||||
void CRegisterWindow::NotifyUpdate()
|
||||
{
|
||||
if (m_GPRGridView != NULL)
|
||||
if (m_GPRGridView != nullptr)
|
||||
m_GPRGridView->Update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user