From 1d31420650bfa7ca1d1503cc7431b3360e86022c Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Mon, 3 Dec 2018 12:20:33 +0100 Subject: qt,cpp: Consistently use nullptr and override * lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am (AM_CPPFLAGS): Add suggest-override and zero-as-null-pointer-constant warnings. * lang/cpp/src/*, lang/qt/src/*: Consistenly use nullptr and override. -- This was especially important for the headers so that downstream users of GpgME++ or QGpgME do not get flooded by warnings if they have these warnings enabled. It also improves compiler errors/warnings in case of accidental mistakes. --- lang/cpp/src/eventloopinteractor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lang/cpp/src/eventloopinteractor.cpp') diff --git a/lang/cpp/src/eventloopinteractor.cpp b/lang/cpp/src/eventloopinteractor.cpp index a30b793c..09710ad4 100644 --- a/lang/cpp/src/eventloopinteractor.cpp +++ b/lang/cpp/src/eventloopinteractor.cpp @@ -77,10 +77,10 @@ public: const gpgme_io_cbs EventLoopInteractor::Private::iocbs = { &EventLoopInteractor::Private::registerIOCb, - 0, + nullptr, &EventLoopInteractor::Private::removeIOCb, &EventLoopInteractor::Private::eventIOCb, - 0 + nullptr }; // @@ -114,7 +114,7 @@ void EventLoopInteractor::Private::removeIOCb(void *tag) it != instance()->d->mCallbacks.end() ; ++it) { if (*it == tag) { instance()->unregisterWatcher((*it)->externalTag); - delete *it; *it = 0; + delete *it; *it = nullptr; instance()->d->mCallbacks.erase(it); return; } @@ -159,7 +159,7 @@ void EventLoopInteractor::Private::eventIOCb(void *data, gpgme_event_io_t type, // EventLoopInteractor Implementation // -EventLoopInteractor *EventLoopInteractor::mSelf = 0; +EventLoopInteractor *EventLoopInteractor::mSelf = nullptr; EventLoopInteractor::EventLoopInteractor() : d(new Private) { @@ -170,7 +170,7 @@ EventLoopInteractor::EventLoopInteractor() : d(new Private) EventLoopInteractor::~EventLoopInteractor() { // warn if there are still callbacks registered - mSelf = 0; + mSelf = nullptr; delete d; } -- cgit v1.2.3