diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-04-23 19:46:58 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-04-23 19:46:58 +0200 |
commit | 534b6f3fb3a4bd14d78942cab7eb430dd98e471c (patch) | |
tree | 06192a8cef7df59891319704d8bb402efb5db261 /lib/e2ee | |
parent | 87e8d6d6ef325f176a7d3b5da441569f9b24c847 (diff) | |
download | libquotient-534b6f3fb3a4bd14d78942cab7eb430dd98e471c.tar.gz libquotient-534b6f3fb3a4bd14d78942cab7eb430dd98e471c.zip |
SLICE()
Add a macro to make slicing clear in the code and quiet for static
analysis.
Diffstat (limited to 'lib/e2ee')
-rw-r--r-- | lib/e2ee/qolmmessage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/e2ee/qolmmessage.cpp b/lib/e2ee/qolmmessage.cpp index 81b166b0..f9b4a5c2 100644 --- a/lib/e2ee/qolmmessage.cpp +++ b/lib/e2ee/qolmmessage.cpp @@ -4,6 +4,8 @@ #include "qolmmessage.h" +#include "util.h" + using namespace Quotient; QOlmMessage::QOlmMessage(QByteArray ciphertext, QOlmMessage::Type type) @@ -26,7 +28,7 @@ QOlmMessage::Type QOlmMessage::type() const QByteArray QOlmMessage::toCiphertext() const { - return QByteArray(*this); + return SLICE(*this, QByteArray); } QOlmMessage QOlmMessage::fromCiphertext(const QByteArray &ciphertext) |