aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/eventloopinteractor.cpp
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2018-12-03 11:20:33 +0000
committerAndre Heinecke <[email protected]>2018-12-03 11:25:00 +0000
commit1d31420650bfa7ca1d1503cc7431b3360e86022c (patch)
tree3155599aae033d00696c12c55459ecbe1b92b598 /lang/cpp/src/eventloopinteractor.cpp
parentdoc: Minor comment cleanups. (diff)
downloadgpgme-1d31420650bfa7ca1d1503cc7431b3360e86022c.tar.gz
gpgme-1d31420650bfa7ca1d1503cc7431b3360e86022c.zip
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.
Diffstat (limited to 'lang/cpp/src/eventloopinteractor.cpp')
-rw-r--r--lang/cpp/src/eventloopinteractor.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}