From e5dcf48d43cce5ad46885133136dc135de6bd087 Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Tue, 8 Mar 2022 19:07:57 +0300 Subject: [PATCH] Version 1.4.9: Use bare way to read option --- Telegram/SourceFiles/data/data_chat_filters.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/data/data_chat_filters.cpp b/Telegram/SourceFiles/data/data_chat_filters.cpp index efc0e13e6..2eaf4374b 100644 --- a/Telegram/SourceFiles/data/data_chat_filters.cpp +++ b/Telegram/SourceFiles/data/data_chat_filters.cpp @@ -164,11 +164,13 @@ LocalFolder MakeLocalFolder(const QJsonObject &obj) { }); for (const auto &[flag, option] : LocalFolderSettingsFlags) { - ReadOption(obj, option, [&](auto v) { + const auto it = obj.constFind(option); + if (it != obj.constEnd()) { + const auto v = *it; if (v.isBool() && v.toBool()) { result.flags |= flag; } - }); + } } const auto readChatsArray = [obj] (const QString &key, std::vector &chats) {