Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr check for some ports (GTK, X11, OSX) and manual changes to the ports for which it couldn't be used easily (MSW, DFB) and also manually updating the docs. Also replace NULL with null or nullptr in the comments as this is more consistent with the use of nullptr in the code and makes it simpler to grep for the remaining occurrences of NULL itself. And also use null in the assert messages. Only a few occurrences of "NULL" are still left in non-C files, mostly corresponding to unclear comments or string output which it might not be safe to change.
This commit is contained in:
parent
39ea524943
commit
4f4c5fcfdf
1844 changed files with 13721 additions and 13734 deletions
|
|
@ -114,7 +114,7 @@ bool MyApp::OnInit()
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title)
|
||||
: wxFrame(nullptr, wxID_ANY, title)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ bool MyApp::OnInit()
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size),
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size),
|
||||
help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
|
@ -192,11 +192,11 @@ void MyFrame::OnClose(wxCloseEvent& event)
|
|||
{
|
||||
// Close the help frame; this will cause the config data to
|
||||
// get written.
|
||||
if ( help.GetFrame() ) // returns NULL if no help frame active
|
||||
if ( help.GetFrame() ) // returns nullptr if no help frame active
|
||||
help.GetFrame()->Close(true);
|
||||
// now we can safely delete the config pointer
|
||||
event.Skip();
|
||||
delete wxConfig::Set(NULL);
|
||||
delete wxConfig::Set(nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ bool MyApp::OnInit()
|
|||
int MyApp::OnExit()
|
||||
{
|
||||
delete help;
|
||||
delete wxConfig::Set(NULL);
|
||||
delete wxConfig::Set(nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ bool MyApp::OnInit()
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ bool MyApp::OnInit()
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size,
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size,
|
||||
wxDEFAULT_FRAME_STYLE, "html_test_app")
|
||||
{
|
||||
// create a menu bar
|
||||
|
|
@ -272,7 +272,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
|||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_Html->WriteCustomization(wxConfig::Get());
|
||||
delete wxConfig::Set(NULL);
|
||||
delete wxConfig::Set(nullptr);
|
||||
|
||||
// true is to force the frame to close
|
||||
Close(true);
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ wxHtmlWindow *html;
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ wxHtmlWindow *html;
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ wxHtmlWindow *html;
|
|||
|
||||
// frame constructor
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
: wxFrame(nullptr, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue