diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-09-03 22:32:50 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-09-03 22:32:50 +0200 |
commit | 787601f22025fc33bbcff768ebc6e554ec2809a2 (patch) | |
tree | 0f51e5121b314abe085759c07f6aad813e49f434 /lib | |
parent | 813c8e3fe0da9ee3b46fff1618d3e4ed05f2c429 (diff) | |
download | libquotient-787601f22025fc33bbcff768ebc6e554ec2809a2.tar.gz libquotient-787601f22025fc33bbcff768ebc6e554ec2809a2.zip |
Address clazy warnings
Diffstat (limited to 'lib')
-rw-r--r-- | lib/room.cpp | 2 | ||||
-rw-r--r-- | lib/settings.cpp | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 0a4e041b..6b2b7b23 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -553,7 +553,7 @@ QStringList Room::localAliases() const QStringList Room::remoteAliases() const { QStringList result; - for (const auto& s : d->aliasServers) + for (const auto& s : std::as_const(d->aliasServers)) result += d->getCurrentState<RoomAliasesEvent>(s)->aliases(); return result; } diff --git a/lib/settings.cpp b/lib/settings.cpp index 5413693d..dd086d9c 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -53,11 +53,12 @@ bool Settings::contains(const QString& key) const QStringList Settings::childGroups() const { - auto l = QSettings::childGroups(); - for (const auto& g: legacySettings.childGroups()) - if (!l.contains(g)) - l.push_back(g); - return l; + auto groups = QSettings::childGroups(); + const auto& legacyGroups = legacySettings.childGroups(); + for (const auto& g: legacyGroups) + if (!groups.contains(g)) + groups.push_back(g); + return groups; } void SettingsGroup::setValue(const QString& key, const QVariant& value) |