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/trustitem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lang/cpp/src/trustitem.cpp') diff --git a/lang/cpp/src/trustitem.cpp b/lang/cpp/src/trustitem.cpp index c29c0f41..4302f657 100644 --- a/lang/cpp/src/trustitem.cpp +++ b/lang/cpp/src/trustitem.cpp @@ -67,7 +67,7 @@ TrustItem::~TrustItem() if (d->item) { gpgme_trust_item_unref(d->item); } - delete d; d = 0; + delete d; d = nullptr; } bool TrustItem::isNull() const @@ -82,22 +82,22 @@ gpgme_trust_item_t TrustItem::impl() const const char *TrustItem::keyID() const { - return d->item ? d->item->keyid : 0 ; + return d->item ? d->item->keyid : nullptr ; } const char *TrustItem::userID() const { - return d->item ? d->item->name : 0 ; + return d->item ? d->item->name : nullptr ; } const char *TrustItem::ownerTrustAsString() const { - return d->item ? d->item->owner_trust : 0 ; + return d->item ? d->item->owner_trust : nullptr ; } const char *TrustItem::validityAsString() const { - return d->item ? d->item->validity : 0 ; + return d->item ? d->item->validity : nullptr ; } int TrustItem::trustLevel() const -- cgit v1.2.3