diff options
| author | levlam <levlam@telegram.org> | 2025-03-13 09:33:38 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-03-13 09:33:38 +0300 |
| commit | b498497bbfd6b80c86f800b3546a0170206317d3 (patch) | |
| tree | e734ffe271f69ef92a8df43c56245e6c015b841d /tdutils | |
| parent | 4c3e73535c489f516572f738a09cc872c40754a7 (diff) | |
Add PublicKey::operator=.
Diffstat (limited to 'tdutils')
| -rw-r--r-- | tdutils/td/utils/Ed25519.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tdutils/td/utils/Ed25519.h b/tdutils/td/utils/Ed25519.h index 3af162537..d3dbd75f5 100644 --- a/tdutils/td/utils/Ed25519.h +++ b/tdutils/td/utils/Ed25519.h @@ -26,7 +26,11 @@ class Ed25519 { PublicKey(const PublicKey &other) : octet_string_(other.octet_string_.copy()) { } PublicKey(PublicKey &&) noexcept = default; - PublicKey &operator=(const PublicKey &) = delete; + PublicKey &operator=(const PublicKey &other) { + CHECK(octet_string_.empty()); + octet_string_ = other.octet_string_.copy(); + return *this; + } PublicKey &operator=(PublicKey &&) noexcept = delete; ~PublicKey() = default; |
