aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/engineinfo.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/engineinfo.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/engineinfo.cpp')
-rw-r--r--lang/cpp/src/engineinfo.cpp12
1 files changed, 6 insertions, 6 deletions
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;
}