Get rid of some mem* calls that are bad C++ form (but worked fine) and cause warnings.

This commit is contained in:
Adam Ierymenko 2019-03-25 11:45:32 -07:00
parent 97046b265c
commit b56753ea9f
2 changed files with 11 additions and 15 deletions

View File

@ -112,14 +112,9 @@ public:
/** /**
* Create an empty certificate of membership * Create an empty certificate of membership
*/ */
CertificateOfMembership() CertificateOfMembership() :
_qualifierCount(0)
{ {
memset(this,0,sizeof(CertificateOfMembership));
}
CertificateOfMembership(const CertificateOfMembership &c)
{
memcpy(this,&c,sizeof(CertificateOfMembership));
} }
/** /**
@ -145,12 +140,6 @@ public:
memset(_signature.data,0,ZT_C25519_SIGNATURE_LEN); memset(_signature.data,0,ZT_C25519_SIGNATURE_LEN);
} }
inline CertificateOfMembership &operator=(const CertificateOfMembership &c)
{
memcpy(this,&c,sizeof(CertificateOfMembership));
return *this;
}
/** /**
* Create from binary-serialized COM in buffer * Create from binary-serialized COM in buffer
* *

View File

@ -58,9 +58,16 @@ class Revocation : public Credential
public: public:
static inline Credential::Type credentialType() { return Credential::CREDENTIAL_TYPE_REVOCATION; } static inline Credential::Type credentialType() { return Credential::CREDENTIAL_TYPE_REVOCATION; }
Revocation() Revocation() :
_id(0),
_credentialId(0),
_networkId(0),
_threshold(0),
_flags(0),
_target(),
_signedBy(),
_type(Credential::CREDENTIAL_TYPE_NULL)
{ {
memset(this,0,sizeof(Revocation));
} }
/** /**