aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdutils/td
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-03-13 09:33:38 +0300
committerlevlam <levlam@telegram.org>2025-03-13 09:33:38 +0300
commitb498497bbfd6b80c86f800b3546a0170206317d3 (patch)
treee734ffe271f69ef92a8df43c56245e6c015b841d /tdutils/td
parent4c3e73535c489f516572f738a09cc872c40754a7 (diff)
Add PublicKey::operator=.
Diffstat (limited to 'tdutils/td')
-rw-r--r--tdutils/td/utils/Ed25519.h6
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;