aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmmessage.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-21 15:45:59 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 10:46:34 +0200
commitbcc05aa1d52cae2b6d8e70bb6cf04fa49904687a (patch)
tree7d005271303f9d96de10766cfab4a5b5e2dceafe /lib/e2ee/qolmmessage.cpp
parent363a7e40e8aa12cb780b076cca8db4f47b70f4fa (diff)
downloadlibquotient-bcc05aa1d52cae2b6d8e70bb6cf04fa49904687a.tar.gz
libquotient-bcc05aa1d52cae2b6d8e70bb6cf04fa49904687a.zip
Cleanup across E2EE code
Notably: - simplified unnecessarily verbose constructs; - formally aligned (no re-numeration was necessary) QOlmMessage::Type with corresponding OLM_ constants; - dropped QOlmSession::encryptMessageType() because it's very sensitive to the order of calling with QOlmSession::encrypt() (and encrypt() itself already calls it and returns the message type); - simplify the return type of pickle() calls that can only fail due to an internal error; - replace const QString& with QStringView or const QByteArray& where appropriate; - use '\0' where it was meant to be instead of '0'.
Diffstat (limited to 'lib/e2ee/qolmmessage.cpp')
-rw-r--r--lib/e2ee/qolmmessage.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/e2ee/qolmmessage.cpp b/lib/e2ee/qolmmessage.cpp
index f9b4a5c2..b9cb8bd2 100644
--- a/lib/e2ee/qolmmessage.cpp
+++ b/lib/e2ee/qolmmessage.cpp
@@ -15,12 +15,6 @@ QOlmMessage::QOlmMessage(QByteArray ciphertext, QOlmMessage::Type type)
Q_ASSERT_X(!isEmpty(), "olm message", "Ciphertext is empty");
}
-QOlmMessage::QOlmMessage(const QOlmMessage &message)
- : QByteArray(message)
- , m_messageType(message.type())
-{
-}
-
QOlmMessage::Type QOlmMessage::type() const
{
return m_messageType;