aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolminboundsession.cpp
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2021-12-24 17:07:29 +0100
committerTobias Fella <fella@posteo.de>2021-12-24 17:07:29 +0100
commit60947d610d0ece6943d2c2e385d6c6c2f960853d (patch)
tree08cf62f3b2c866da77a99c5c088bf8dc06ce73a7 /lib/e2ee/qolminboundsession.cpp
parentaeed7f3bada2cefcb52d4418b5ed76f19980d702 (diff)
downloadlibquotient-60947d610d0ece6943d2c2e385d6c6c2f960853d.tar.gz
libquotient-60947d610d0ece6943d2c2e385d6c6c2f960853d.zip
Apply suggestions
Diffstat (limited to 'lib/e2ee/qolminboundsession.cpp')
-rw-r--r--lib/e2ee/qolminboundsession.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/e2ee/qolminboundsession.cpp b/lib/e2ee/qolminboundsession.cpp
index 9bf56b6c..2c546875 100644
--- a/lib/e2ee/qolminboundsession.cpp
+++ b/lib/e2ee/qolminboundsession.cpp
@@ -8,7 +8,7 @@
using namespace Quotient;
QOlmError lastError(OlmInboundGroupSession *session) {
- const std::string error_raw = olm_inbound_group_session_last_error(session);
+ const auto error_raw = olm_inbound_group_session_last_error(session);
return fromString(error_raw);
}
@@ -27,9 +27,8 @@ QOlmInboundGroupSession::~QOlmInboundGroupSession()
std::unique_ptr<QOlmInboundGroupSession> QOlmInboundGroupSession::create(const QByteArray &key)
{
const auto olmInboundGroupSession = olm_inbound_group_session(new uint8_t[olm_inbound_group_session_size()]);
- const auto temp = key;
const auto error = olm_init_inbound_group_session(olmInboundGroupSession,
- reinterpret_cast<const uint8_t *>(temp.data()), temp.size());
+ reinterpret_cast<const uint8_t *>(key.constData()), key.size());
if (error == olm_error()) {
throw lastError(olmInboundGroupSession);