aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2ee/qolmaccount.cpp')
-rw-r--r--lib/e2ee/qolmaccount.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/e2ee/qolmaccount.cpp b/lib/e2ee/qolmaccount.cpp
index d03bcb3b..7392a9f5 100644
--- a/lib/e2ee/qolmaccount.cpp
+++ b/lib/e2ee/qolmaccount.cpp
@@ -43,15 +43,16 @@ QOlmAccount::~QOlmAccount()
void QOlmAccount::createNewAccount()
{
m_account = olm_account(new uint8_t[olm_account_size()]);
- const auto randomLength = olm_create_account_random_length(m_account);
- if (olm_create_account(m_account, RandomBuffer(randomLength), randomLength)
+ if (const auto randomLength = olm_create_account_random_length(m_account);
+ olm_create_account(m_account, RandomBuffer(randomLength), randomLength)
== olm_error())
QOLM_INTERNAL_ERROR("Failed to create a new account");
emit needsSave();
}
-OlmErrorCode QOlmAccount::unpickle(QByteArray&& pickled, const PicklingMode &mode)
+OlmErrorCode QOlmAccount::unpickle(QByteArray&& pickled,
+ const PicklingMode& mode)
{
m_account = olm_account(new uint8_t[olm_account_size()]);
if (const auto key = toKey(mode);