From 783269e256df8457d3f3869c650548a4b86b6307 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 6 Feb 2020 18:32:02 +0300 Subject: [PATCH] Removed unnecessary Sets() function. --- .../SourceFiles/chat_helpers/emoji_sets_manager.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp index 13709bc51..a59a2a2e9 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_sets_manager.cpp @@ -45,10 +45,6 @@ const auto kSets = { Set{ {3, 238, 6'992'260, "JoyPixels"}, PreviewPath(3) }, }; -auto Sets() { - return kSets; -} - using Loading = MTP::DedicatedLoader::Progress; using SetState = BlobState; @@ -119,8 +115,7 @@ void SetGlobalLoader(base::unique_qptr loader) { } int GetDownloadSize(int id) { - const auto sets = Sets(); - return ranges::find(sets, id, &Set::id)->size; + return ranges::find(kSets, id, &Set::id)->size; } [[nodiscard]] float64 CountProgress(not_null loading) { @@ -131,8 +126,7 @@ int GetDownloadSize(int id) { MTP::DedicatedLoader::Location GetDownloadLocation(int id) { const auto username = kCloudLocationUsername.utf16(); - const auto sets = Sets(); - const auto i = ranges::find(sets, id, &Set::id); + const auto i = ranges::find(kSets, id, &Set::id); return MTP::DedicatedLoader::Location{ username, i->postId }; } @@ -203,8 +197,7 @@ Inner::Inner(QWidget *parent) : RpWidget(parent) { void Inner::setupContent() { const auto content = Ui::CreateChild(this); - const auto sets = Sets(); - for (const auto &set : sets) { + for (const auto &set : kSets) { content->add(object_ptr(content, set)); }