Skip to content

Commit b498497

Browse files
committed
Add PublicKey::operator=.
1 parent 4c3e735 commit b498497

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tdutils/td/utils/Ed25519.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ class Ed25519 {
2626
PublicKey(const PublicKey &other) : octet_string_(other.octet_string_.copy()) {
2727
}
2828
PublicKey(PublicKey &&) noexcept = default;
29-
PublicKey &operator=(const PublicKey &) = delete;
29+
PublicKey &operator=(const PublicKey &other) {
30+
CHECK(octet_string_.empty());
31+
octet_string_ = other.octet_string_.copy();
32+
return *this;
33+
}
3034
PublicKey &operator=(PublicKey &&) noexcept = delete;
3135
~PublicKey() = default;
3236

0 commit comments

Comments
 (0)