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/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/cpp/src/global.h') diff --git a/lang/cpp/src/global.h b/lang/cpp/src/global.h index e303c49a..9760e215 100644 --- a/lang/cpp/src/global.h +++ b/lang/cpp/src/global.h @@ -165,7 +165,7 @@ GPGMEPP_EXPORT bool hasFeature(unsigned long feature, unsigned long feature2); struct __safe_bool_dummy__ { void nonnull() {} }; \ typedef void ( __safe_bool_dummy__::*unspecified_bool_type )(); \ public: \ - operator unspecified_bool_type() const { return ( Cond ) ? &__safe_bool_dummy__::nonnull : 0 ; } + operator unspecified_bool_type() const { return ( Cond ) ? &__safe_bool_dummy__::nonnull : nullptr; } # endif inline int _gpgmepp_strcmp(const char *s1, const char *s2) -- cgit v1.2.3