refactor: fix clang-tidy auto*, const&, and curly braces (#5083)

This commit is contained in:
pajlada
2024-01-14 17:54:52 +01:00
committed by GitHub
parent 292f9b9734
commit 5b6675abb4
78 changed files with 647 additions and 228 deletions
+7 -1
View File
@@ -27,11 +27,15 @@ void ChatterSet::updateOnlineChatters(
for (auto &&chatter : lowerCaseUsernames)
{
if (this->items.exists(chatter))
{
tmp.put(chatter, this->items.get(chatter));
// Less chatters than the limit => try to preserve as many as possible.
// Less chatters than the limit => try to preserve as many as possible.
}
else if (lowerCaseUsernames.size() < chatterLimit)
{
tmp.put(chatter, chatter);
}
}
this->items = std::move(tmp);
@@ -50,7 +54,9 @@ std::vector<QString> ChatterSet::filterByPrefix(const QString &prefix) const
for (auto &&item : this->items)
{
if (item.first.startsWith(lowerPrefix))
{
result.push_back(item.second);
}
}
return result;