Apply clang-tidy fix 'modernize-use-nullptr'

This commit is contained in:
Gunnar Beutner 2018-01-04 09:18:50 +01:00
parent becfa85094
commit e0c350b8a5
5 changed files with 8 additions and 11 deletions

View File

@ -68,8 +68,8 @@ MainFormBase::MainFormBase( wxWindow* parent, wxWindowID id, const wxString& tit
// Connect Events
this->Connect( m_QuitMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFormBase::OnQuitClicked ) );
this->Connect( m_AboutMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFormBase::OnAboutClicked ) );
m_TypesTree->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( MainFormBase::OnTypeSelected ), NULL, this );
m_ObjectsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFormBase::OnObjectSelected ), NULL, this );
m_TypesTree->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( MainFormBase::OnTypeSelected ), nullptr, this );
m_ObjectsList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFormBase::OnObjectSelected ), nullptr, this );
}
MainFormBase::~MainFormBase()
@ -77,8 +77,8 @@ MainFormBase::~MainFormBase()
// Disconnect Events
this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFormBase::OnQuitClicked ) );
this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFormBase::OnAboutClicked ) );
m_TypesTree->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( MainFormBase::OnTypeSelected ), NULL, this );
m_ObjectsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFormBase::OnObjectSelected ), NULL, this );
m_TypesTree->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( MainFormBase::OnTypeSelected ), nullptr, this );
m_ObjectsList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( MainFormBase::OnObjectSelected ), nullptr, this );
}

View File

@ -115,7 +115,7 @@ void __cxa_throw(void *obj, TYPEINFO_TYPE *pvtinfo, void (*dest)(void *))
l_LastExceptionDest.reset(new DestCallback(dest));
#endif /* !defined(__GLIBCXX__) && !defined(_WIN32) */
if (real_cxa_throw == 0)
if (real_cxa_throw == nullptr)
real_cxa_throw = (cxa_throw_fn)dlsym(RTLD_NEXT, "__cxa_throw");
#ifndef NO_CAST_EXCEPTION

View File

@ -43,9 +43,6 @@ static Timer::Ptr l_ObjectCountTimer;
*/
Object::Object()
: m_References(0), m_Mutex(0)
#ifdef I2_DEBUG
, m_LockOwner(0)
#endif /* I2_DEBUG */
{ }
/**
@ -77,7 +74,7 @@ bool Object::OwnsLock() const
return (tid == GetCurrentThreadId());
#else /* _WIN32 */
pthread_t tid = __sync_fetch_and_add(&m_LockOwner, 0);
pthread_t tid = __sync_fetch_and_add(&m_LockOwner, nullptr);
return (tid == pthread_self());
#endif /* _WIN32 */

View File

@ -379,7 +379,7 @@ int MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile,
<< boost::errinfo_file_name(keyfile));
}
if (!PEM_write_bio_PrivateKey(bio, key, nullptr, nullptr, 0, 0, nullptr)) {
if (!PEM_write_bio_PrivateKey(bio, key, nullptr, nullptr, 0, nullptr, nullptr)) {
EVP_PKEY_free(key);
EC_KEY_free(eckey);
BIO_free(bio);

View File

@ -84,7 +84,7 @@ String Utility::DemangleSymbolName(const String& sym)
#ifdef HAVE_CXXABI_H
int status;
char *realname = abi::__cxa_demangle(sym.CStr(), 0, 0, &status);
char *realname = abi::__cxa_demangle(sym.CStr(), nullptr, nullptr, &status);
if (realname) {
result = String(realname);