[crypto] compilation fix for clang10 -Wdeprecated-copy (#7487)

Deleting a copy constructor without specifying an explicit assignment
operator causes an error in clang10 (-Wdeprecated-copy). Since
explicit assignment operator defined in
OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE case, added the copy
constructor deletion also under the same. If the macro is not enabled,
implicit copy constructor and assignment operator would take effect.
This commit is contained in:
sarveshkumarv3
2022-03-17 22:18:30 -07:00
committed by GitHub
parent fba6bc90e6
commit 5ee837efbb
+2 -2
View File
@@ -469,6 +469,8 @@ public:
*
*/
KeyMaterial &operator=(const KeyMaterial &aOther);
KeyMaterial(const KeyMaterial &) = delete;
#endif
/**
@@ -539,8 +541,6 @@ public:
*/
bool operator==(const KeyMaterial &aOther) const;
KeyMaterial(const KeyMaterial &) = delete;
private:
#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
static constexpr KeyRef kInvalidKeyRef = Crypto::Storage::kInvalidKeyRef;