refactor: fix clang-tidy auto*, const&, and curly braces (#5083)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user