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/importresult.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lang/cpp/src/importresult.cpp') diff --git a/lang/cpp/src/importresult.cpp b/lang/cpp/src/importresult.cpp index dbb31d05..05943ca0 100644 --- a/lang/cpp/src/importresult.cpp +++ b/lang/cpp/src/importresult.cpp @@ -46,16 +46,16 @@ public: for (gpgme_import_status_t is = r.imports ; is ; is = is->next) { gpgme_import_status_t copy = new _gpgme_import_status(*is); copy->fpr = strdup(is->fpr); - copy->next = 0; + copy->next = nullptr; imports.push_back(copy); } - res.imports = 0; + res.imports = nullptr; } ~Private() { for (std::vector::iterator it = imports.begin() ; it != imports.end() ; ++it) { std::free((*it)->fpr); - delete *it; *it = 0; + delete *it; *it = nullptr; } } @@ -192,7 +192,7 @@ bool GpgME::Import::isNull() const const char *GpgME::Import::fingerprint() const { - return isNull() ? 0 : d->imports[idx]->fpr ; + return isNull() ? nullptr : d->imports[idx]->fpr ; } GpgME::Error GpgME::Import::error() const -- cgit v1.2.3