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.
This commit is contained in:
parent
e16c368758
commit
dc9cc9aa07
@ -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) {
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
|
||||
static const Null null;
|
||||
|
||||
Data(const Data &other) = default;
|
||||
const Data &operator=(Data other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
DecryptionResult(gpgme_ctx_t ctx, const Error &err);
|
||||
explicit DecryptionResult(const Error &err);
|
||||
|
||||
DecryptionResult(const DecryptionResult &other) = default;
|
||||
const DecryptionResult &operator=(DecryptionResult other)
|
||||
{
|
||||
swap(other);
|
||||
@ -103,6 +104,7 @@ public:
|
||||
Recipient();
|
||||
explicit Recipient(gpgme_recipient_t reci);
|
||||
|
||||
Recipient(const Recipient &other) = default;
|
||||
const Recipient &operator=(Recipient other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
EncryptionResult(gpgme_ctx_t ctx, const Error &error);
|
||||
EncryptionResult(const Error &err);
|
||||
|
||||
EncryptionResult(const EncryptionResult &other) = default;
|
||||
const EncryptionResult &operator=(EncryptionResult other)
|
||||
{
|
||||
swap(other);
|
||||
@ -83,6 +84,7 @@ class GPGMEPP_EXPORT InvalidRecipient
|
||||
public:
|
||||
InvalidRecipient();
|
||||
|
||||
InvalidRecipient(const InvalidRecipient &other) = default;
|
||||
const InvalidRecipient &operator=(InvalidRecipient other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -151,6 +151,7 @@ public:
|
||||
EngineInfo();
|
||||
explicit EngineInfo(gpgme_engine_info_t engine);
|
||||
|
||||
EngineInfo(const EngineInfo &other) = default;
|
||||
const EngineInfo &operator=(EngineInfo other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
ImportResult(gpgme_ctx_t ctx, const Error &error);
|
||||
explicit ImportResult(const Error &error);
|
||||
|
||||
ImportResult(const ImportResult &other) = default;
|
||||
const ImportResult &operator=(ImportResult other)
|
||||
{
|
||||
swap(other);
|
||||
@ -106,6 +107,7 @@ class GPGMEPP_EXPORT Import
|
||||
public:
|
||||
Import();
|
||||
|
||||
Import(const Import &other) = default;
|
||||
const Import &operator=(Import other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -71,6 +71,7 @@ public:
|
||||
|
||||
static const Null null;
|
||||
|
||||
Key(const Key &other) = default;
|
||||
const Key &operator=(Key other)
|
||||
{
|
||||
swap(other);
|
||||
@ -228,6 +229,7 @@ public:
|
||||
Subkey(const shared_gpgme_key_t &key, gpgme_sub_key_t subkey);
|
||||
Subkey(const shared_gpgme_key_t &key, unsigned int idx);
|
||||
|
||||
Subkey(const Subkey &other) = default;
|
||||
const Subkey &operator=(Subkey other)
|
||||
{
|
||||
swap(other);
|
||||
@ -341,6 +343,7 @@ public:
|
||||
UserID(const shared_gpgme_key_t &key, gpgme_user_id_t uid);
|
||||
UserID(const shared_gpgme_key_t &key, unsigned int idx);
|
||||
|
||||
UserID(const UserID &other) = default;
|
||||
const UserID &operator=(UserID other)
|
||||
{
|
||||
swap(other);
|
||||
@ -459,6 +462,7 @@ public:
|
||||
Signature(const shared_gpgme_key_t &key, gpgme_user_id_t uid, gpgme_key_sig_t sig);
|
||||
Signature(const shared_gpgme_key_t &key, gpgme_user_id_t uid, unsigned int idx);
|
||||
|
||||
Signature(const Signature &other) = default;
|
||||
const Signature &operator=(Signature other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
KeyGenerationResult(gpgme_ctx_t ctx, const Error &error);
|
||||
explicit KeyGenerationResult(const Error &err);
|
||||
|
||||
KeyGenerationResult(const KeyGenerationResult &other) = default;
|
||||
const KeyGenerationResult &operator=(KeyGenerationResult other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
explicit KeyListResult(const Error &err);
|
||||
KeyListResult(const Error &err, const _gpgme_op_keylist_result &res);
|
||||
|
||||
KeyListResult(const KeyListResult &other) = default;
|
||||
const KeyListResult &operator=(KeyListResult other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
Notation();
|
||||
explicit Notation(gpgme_sig_notation_t nota);
|
||||
|
||||
Notation(const Notation &other) = default;
|
||||
const Notation &operator=(Notation other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
SigningResult(gpgme_ctx_t ctx, const Error &error);
|
||||
explicit SigningResult(const Error &err);
|
||||
|
||||
SigningResult(const SigningResult &other) = default;
|
||||
const SigningResult &operator=(SigningResult other)
|
||||
{
|
||||
swap(other);
|
||||
@ -86,6 +87,7 @@ class GPGMEPP_EXPORT InvalidSigningKey
|
||||
public:
|
||||
InvalidSigningKey();
|
||||
|
||||
InvalidSigningKey(const InvalidSigningKey &other) = default;
|
||||
const InvalidSigningKey &operator=(InvalidSigningKey other)
|
||||
{
|
||||
swap(other);
|
||||
@ -119,6 +121,7 @@ public:
|
||||
|
||||
CreatedSignature();
|
||||
|
||||
CreatedSignature(const CreatedSignature &other) = default;
|
||||
const CreatedSignature &operator=(CreatedSignature other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -62,6 +62,7 @@ public:
|
||||
const char *iversion = NULL,
|
||||
Error *err = NULL);
|
||||
|
||||
SwdbResult(const SwdbResult &other) = default;
|
||||
const SwdbResult &operator=(SwdbResult other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
TofuInfo();
|
||||
explicit TofuInfo(gpgme_tofu_info_t info);
|
||||
|
||||
TofuInfo(const TofuInfo &other) = default;
|
||||
const TofuInfo &operator=(TofuInfo other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -52,6 +52,7 @@ public:
|
||||
VerificationResult(gpgme_ctx_t ctx, const Error &error);
|
||||
explicit VerificationResult(const Error &err);
|
||||
|
||||
VerificationResult(const VerificationResult &other) = default;
|
||||
const VerificationResult &operator=(VerificationResult other)
|
||||
{
|
||||
swap(other);
|
||||
@ -90,6 +91,7 @@ public:
|
||||
|
||||
Signature();
|
||||
|
||||
Signature(const Signature &other) = default;
|
||||
const Signature &operator=(Signature other)
|
||||
{
|
||||
swap(other);
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
VfsMountResult(gpgme_ctx_t ctx, const Error &error, const Error &opError);
|
||||
explicit VfsMountResult(const Error &err);
|
||||
|
||||
VfsMountResult(const VfsMountResult &other) = default;
|
||||
const VfsMountResult &operator=(VfsMountResult other)
|
||||
{
|
||||
swap(other);
|
||||
|
Loading…
Reference in New Issue
Block a user