From c11760d1405284527ff97b10c5ec01f9c7d1087b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 10 Dec 2021 16:36:06 +0400 Subject: [PATCH] Fix -Wrange-loop-analysis --- Telegram/SourceFiles/data/data_chat_filters.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/data/data_chat_filters.cpp b/Telegram/SourceFiles/data/data_chat_filters.cpp index bbf517159..8bfe9699c 100644 --- a/Telegram/SourceFiles/data/data_chat_filters.cpp +++ b/Telegram/SourceFiles/data/data_chat_filters.cpp @@ -218,20 +218,20 @@ LocalFolder ChatFilter::toLocal(int cloudOrder, FilterId replaceId) const { auto always = _always; auto pinned = std::vector(); pinned.reserve(_pinned.size()); - for (const auto history : _pinned) { + for (const auto &history : _pinned) { const auto &peer = history->peer; pinned.push_back(peer->id.value); always.remove(history); } auto include = std::vector(); include.reserve(always.size()); - for (const auto history : always) { + for (const auto &history : always) { const auto &peer = history->peer; include.push_back(peer->id.value); } auto never = std::vector(); never.reserve(_never.size()); - for (const auto history : _never) { + for (const auto &history : _never) { const auto &peer = history->peer; never.push_back(peer->id.value); }