diff options
| author | Andre Heinecke <[email protected]> | 2018-12-03 11:20:33 +0000 | 
|---|---|---|
| committer | Andre Heinecke <[email protected]> | 2018-12-03 11:25:00 +0000 | 
| commit | 1d31420650bfa7ca1d1503cc7431b3360e86022c (patch) | |
| tree | 3155599aae033d00696c12c55459ecbe1b92b598 /lang/cpp/src/decryptionresult.cpp | |
| parent | doc: Minor comment cleanups. (diff) | |
| download | gpgme-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/decryptionresult.cpp')
| -rw-r--r-- | lang/cpp/src/decryptionresult.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/lang/cpp/src/decryptionresult.cpp b/lang/cpp/src/decryptionresult.cpp index ea0a8a5c..f78cf1d3 100644 --- a/lang/cpp/src/decryptionresult.cpp +++ b/lang/cpp/src/decryptionresult.cpp @@ -59,22 +59,22 @@ public:          for (gpgme_recipient_t r = res.recipients ; r ; r = r->next) {              recipients.push_back(*r);          } -        res.recipients = 0; +        res.recipients = nullptr;      }      ~Private()      {          if (res.unsupported_algorithm) {              std::free(res.unsupported_algorithm);          } -        res.unsupported_algorithm = 0; +        res.unsupported_algorithm = nullptr;          if (res.file_name) {              std::free(res.file_name);          } -        res.file_name = 0; +        res.file_name = nullptr;          if (res.symkey_algo) {              std::free(res.symkey_algo);          } -        res.symkey_algo = 0; +        res.symkey_algo = nullptr;      }      _gpgme_op_decrypt_result res; @@ -109,7 +109,7 @@ make_standard_stuff(DecryptionResult)  const char *GpgME::DecryptionResult::unsupportedAlgorithm() const  { -    return d ? d->res.unsupported_algorithm : 0 ; +    return d ? d->res.unsupported_algorithm : nullptr ;  }  bool GpgME::DecryptionResult::isWrongKeyUsage() const @@ -124,7 +124,7 @@ bool GpgME::DecryptionResult::isDeVs() const  const char *GpgME::DecryptionResult::fileName() const  { -    return d ? d->res.file_name : 0 ; +    return d ? d->res.file_name : nullptr ;  }  unsigned int GpgME::DecryptionResult::numRecipients() const @@ -208,7 +208,7 @@ const char *GpgME::DecryptionResult::Recipient::keyID() const      if (d) {          return d->_keyid;      } -    return 0; +    return nullptr;  }  const char *GpgME::DecryptionResult::Recipient::shortKeyID() const @@ -217,7 +217,7 @@ const char *GpgME::DecryptionResult::Recipient::shortKeyID() const      if (d) {          return d->_keyid + 8;      } -    return 0; +    return nullptr;  }  unsigned int GpgME::DecryptionResult::Recipient::publicKeyAlgorithm() const @@ -233,7 +233,7 @@ const char *GpgME::DecryptionResult::Recipient::publicKeyAlgorithmAsString() con      if (d) {          return gpgme_pubkey_algo_name(d->pubkey_algo);      } -    return 0; +    return nullptr;  }  GpgME::Error GpgME::DecryptionResult::Recipient::status() const  | 
