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/vfsmountresult.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/cpp/src/vfsmountresult.cpp') diff --git a/lang/cpp/src/vfsmountresult.cpp b/lang/cpp/src/vfsmountresult.cpp index 60faa385..901ccfe2 100644 --- a/lang/cpp/src/vfsmountresult.cpp +++ b/lang/cpp/src/vfsmountresult.cpp @@ -40,7 +40,7 @@ using namespace GpgME; class VfsMountResult::Private { public: - explicit Private(const gpgme_vfs_mount_result_t r) : mountDir(0) + explicit Private(const gpgme_vfs_mount_result_t r) : mountDir(nullptr) { if (r && r->mount_dir) { mountDir = strdup(r->mount_dir); @@ -81,7 +81,7 @@ const char *VfsMountResult::mountDir() const if (d) { return d->mountDir; } - return 0; + return nullptr; } std::ostream &GpgME::operator<<(std::ostream &os, const VfsMountResult &result) -- cgit v1.2.3