summaryrefslogtreecommitdiff
path: root/utils/mir_signal.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-10-17 19:24:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-10-17 19:24:12 +0300
commit59d299ee3fb2d5068c38ff8b61f5b993c682e394 (patch)
tree02b236ee801b531a2c64908084f2c0fad76d6840 /utils/mir_signal.h
parent412bf82cd0d386516a74d83e5b02eb944f8e2012 (diff)
code simplification
Diffstat (limited to 'utils/mir_signal.h')
-rw-r--r--utils/mir_signal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/mir_signal.h b/utils/mir_signal.h
index ef443374ff..313714edac 100644
--- a/utils/mir_signal.h
+++ b/utils/mir_signal.h
@@ -40,6 +40,7 @@ class SignalBuffer
signal_buffer *m_buf;
public:
+ SignalBuffer() : m_buf(nullptr) {}
SignalBuffer(const class MBinBuffer &buf);
SignalBuffer(const ec_public_key *key);
SignalBuffer(const ec_private_key *key);
@@ -47,6 +48,9 @@ public:
SignalBuffer(const session_signed_pre_key *pre_key);
~SignalBuffer();
+ void operator=(signal_buffer *buf);
+
+ __forceinline operator bool() const { return m_buf != nullptr; }
__forceinline uint8_t* data() const { return m_buf->data; }
__forceinline unsigned len() const { return unsigned(m_buf->len); }