2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Appended references to const auto types in loop to prevent copying.

Suggested by Apple Clang.
This commit is contained in:
23rd
2021-09-08 13:53:54 +03:00
committed by John Preston
parent baea762832
commit 900a7d0b2b
67 changed files with 153 additions and 153 deletions

View File

@@ -411,7 +411,7 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
if (_chat->noParticipantInfo()) {
_chat->session().api().requestFullPeer(_chat);
} else if (!_chat->participants.empty()) {
for (const auto user : _chat->participants) {
for (const auto &user : _chat->participants) {
if (user->isInaccessible()) continue;
if (!listAllSuggestions && filterNotPassedByName(user)) continue;
if (indexOfInFirstN(mrows, user, recentInlineBots) >= 0) continue;
@@ -469,7 +469,7 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
_chat->session().api().requestFullPeer(_chat);
} else if (!_chat->participants.empty()) {
const auto &commands = _chat->botCommands();
for (const auto user : _chat->participants) {
for (const auto &user : _chat->participants) {
if (!user->isBot()) {
continue;
}
@@ -493,7 +493,7 @@ void FieldAutocomplete::updateFiltered(bool resetScroll) {
}
} else {
const auto &commands = _channel->mgInfo->botCommands();
for (const auto user : _channel->mgInfo->bots) {
for (const auto &user : _channel->mgInfo->bots) {
if (!user->isBot()) {
continue;
}