aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/e2ee/qolmaccount.cpp4
-rw-r--r--lib/room.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/e2ee/qolmaccount.cpp b/lib/e2ee/qolmaccount.cpp
index 4cfc6151..241ae750 100644
--- a/lib/e2ee/qolmaccount.cpp
+++ b/lib/e2ee/qolmaccount.cpp
@@ -160,8 +160,8 @@ UnsignedOneTimeKeys QOlmAccount::oneTimeKeys() const
OneTimeKeys QOlmAccount::signOneTimeKeys(const UnsignedOneTimeKeys &keys) const
{
OneTimeKeys signedOneTimeKeys;
- const auto& curveKeys = keys.curve25519();
- for (const auto& [keyId, key] : asKeyValueRange(curveKeys))
+ for (const auto& curveKeys = keys.curve25519();
+ const auto& [keyId, key] : asKeyValueRange(curveKeys))
signedOneTimeKeys["signed_curve25519:" % keyId] =
signedOneTimeKey(key.toUtf8(), sign(QJsonObject{{"key", key}}));
return signedOneTimeKeys;
diff --git a/lib/room.cpp b/lib/room.cpp
index 9e2a5053..284d19df 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1531,7 +1531,7 @@ QStringList Room::safeMemberNames() const
{
QStringList res;
res.reserve(d->membersMap.size());
- for (auto u: std::as_const(d->membersMap))
+ for (const auto* u: std::as_const(d->membersMap))
res.append(safeMemberName(u->id()));
return res;
@@ -1541,7 +1541,7 @@ QStringList Room::htmlSafeMemberNames() const
{
QStringList res;
res.reserve(d->membersMap.size());
- for (auto u: std::as_const(d->membersMap))
+ for (const auto* u: std::as_const(d->membersMap))
res.append(htmlSafeMemberName(u->id()));
return res;
@@ -3378,7 +3378,7 @@ QString Room::Private::calculateDisplayname() const
shortlist = buildShortlist(membersLeft);
QStringList names;
- for (auto u : shortlist) {
+ for (const auto* u : shortlist) {
if (u == nullptr || isLocalUser(u))
break;
// Only disambiguate if the room is not empty