aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 641f6a6b..67cd1117 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -111,8 +111,7 @@ void User::Private::setNameForRoom(const Room* r, QString newName,
et.start();
}
- const auto& roomMap = connection->roomMap();
- for (auto* r1 : roomMap)
+ for (auto* r1: connection->allRooms())
if (nameForRoom(r1) == mostUsedName)
otherNames.insert(mostUsedName, r1);
@@ -176,8 +175,7 @@ void User::Private::setAvatarForRoom(const Room* r, const QUrl& newUrl,
nextMostUsedIt = otherAvatars.end() - 1;
}
std::swap(mostUsedAvatar, *nextMostUsedIt);
- const auto& roomMap = connection->roomMap();
- for (const auto* r1 : roomMap)
+ for (const auto* r1: connection->allRooms())
if (avatarUrlForRoom(r1) == nextMostUsedIt->url())
avatarsToRooms.insert(nextMostUsedIt->url(), r1);