From ca1c826c5cac9afa8301e35d09ae684a05722482 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 14 Dec 2022 11:53:36 +0400 Subject: [PATCH] Simplify some code. --- Telegram/SourceFiles/data/data_forum_icons.cpp | 2 +- Telegram/SourceFiles/window/window_session_controller.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/data/data_forum_icons.cpp b/Telegram/SourceFiles/data/data_forum_icons.cpp index 346e40881a..1469cf5596 100644 --- a/Telegram/SourceFiles/data/data_forum_icons.cpp +++ b/Telegram/SourceFiles/data/data_forum_icons.cpp @@ -76,7 +76,7 @@ void ForumIcons::updateDefault(const MTPDmessages_stickerSet &data) { const auto &list = data.vdocuments().v; _default.clear(); _default.reserve(list.size()); - for (const auto &sticker : data.vdocuments().v) { + for (const auto &sticker : list) { _default.push_back(_owner->processDocument(sticker)->id); } _defaultUpdated.fire({}); diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 1d99fcc574..7f82d249f5 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -728,7 +728,7 @@ SessionController::SessionController( , _defaultChatTheme(std::make_shared()) , _chatStyle(std::make_unique()) , _cachedReactionIconFactory(std::make_unique()) -, _giftPremiumValidator(GiftPremiumValidator(this)) { +, _giftPremiumValidator(this) { init(); _chatStyleTheme = _defaultChatTheme;