From dc9cc9aa0754d834388acabb5a68677f6512b960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 5 Jan 2023 20:17:57 +0100 Subject: cpp: Expliticly declare compiler generated copy constructors * lang/cpp/src/configuration.h (Component, Option), lang/cpp/src/data.h (Data), lang/cpp/src/decryptionresult.h (DecryptionResult, DecryptionResult::Recipient), lang/cpp/src/encryptionresult.h (EncryptionResult, InvalidRecipient), lang/cpp/src/engineinfo.h (EngineInfo), lang/cpp/src/importresult.h (ImportResult, Import), lang/cpp/src/key.h (Key, Subkey, UserID, UserID::Signature), lang/cpp/src/keygenerationresult.h (KeyGenerationResult), lang/cpp/src/keylistresult.h (KeyListResult), lang/cpp/src/notation.h (Notation), lang/cpp/src/signingresult.h (SigningResult, InvalidSigningKey, CreatedSignature), lang/cpp/src/swdbresult.h (SwdbResult), lang/cpp/src/tofuinfo.h (TofuInfo), lang/cpp/src/verificationresult.h (VerificationResult, Signature), lang/cpp/src/vfsmountresult.h (VfsMountResult): Explitily declare compiler generated copy constructor. -- This fixes "implicitly-declared copy constructor is deprecated" warnings. --- lang/cpp/src/configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lang/cpp/src/configuration.h') diff --git a/lang/cpp/src/configuration.h b/lang/cpp/src/configuration.h index 2e577156..24995dd4 100644 --- a/lang/cpp/src/configuration.h +++ b/lang/cpp/src/configuration.h @@ -98,8 +98,7 @@ public: explicit Component(const shared_gpgme_conf_comp_t &gpgme_comp) : comp(gpgme_comp) {} - // copy ctor is ok - + Component(const Component &other) = default; const Component &operator=(const Component &other) { if (this != &other) { @@ -149,6 +148,7 @@ public: Option(const shared_gpgme_conf_comp_t &gpgme_comp, gpgme_conf_opt_t gpgme_opt) : comp(gpgme_comp), opt(gpgme_opt) {} + Option(const Option &other) = default; const Option &operator=(const Option &other) { if (this != &other) { -- cgit v1.2.3