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/engineinfo.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lang/cpp/src/engineinfo.cpp') diff --git a/lang/cpp/src/engineinfo.cpp b/lang/cpp/src/engineinfo.cpp index 1a66ced2..c4ad5300 100644 --- a/lang/cpp/src/engineinfo.cpp +++ b/lang/cpp/src/engineinfo.cpp @@ -33,10 +33,10 @@ class GpgME::EngineInfo::Private { public: - Private(gpgme_engine_info_t engine = 0) : info(engine) {} + Private(gpgme_engine_info_t engine = nullptr) : info(engine) {} ~Private() { - info = 0; + info = nullptr; } gpgme_engine_info_t info; @@ -70,12 +70,12 @@ GpgME::Protocol GpgME::EngineInfo::protocol() const const char *GpgME::EngineInfo::fileName() const { - return isNull() ? 0 : d->info->file_name; + return isNull() ? nullptr : d->info->file_name; } const char *GpgME::EngineInfo::version() const { - return isNull() ? 0 : d->info->version; + return isNull() ? nullptr : d->info->version; } GpgME::EngineInfo::Version GpgME::EngineInfo::engineVersion() const @@ -85,10 +85,10 @@ GpgME::EngineInfo::Version GpgME::EngineInfo::engineVersion() const const char *GpgME::EngineInfo::requiredVersion() const { - return isNull() ? 0 : d->info->req_version; + return isNull() ? nullptr : d->info->req_version; } const char *GpgME::EngineInfo::homeDirectory() const { - return isNull() ? 0 : d->info->home_dir; + return isNull() ? nullptr : d->info->home_dir; } -- cgit v1.2.3