From edb011dc0dadf93290255b009eba2906df7e2a6c Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 1 Feb 2023 10:04:11 +0400 Subject: [PATCH] Fix build with MSVC. --- Telegram/SourceFiles/info/profile/info_profile_cover.cpp | 2 +- .../info/userpic/info_userpic_emoji_builder_common.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp index f92dffdbc..eae3b777f 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_cover.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_cover.cpp @@ -444,7 +444,7 @@ void Cover::refreshUploadPhotoOverlay() { }(), [=](Ui::UserpicButton::ChosenImage chosen) { using ChosenType = Ui::UserpicButton::ChosenType; auto result = Api::PeerPhoto::UserPhoto{ - base::take(chosen.image), + base::take(chosen.image), // Strange MSVC bug with take. chosen.markup.documentId, chosen.markup.colors, }; diff --git a/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder_common.cpp b/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder_common.cpp index 6ddbf4adf..a440f59b8 100644 --- a/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder_common.cpp +++ b/Telegram/SourceFiles/info/userpic/info_userpic_emoji_builder_common.cpp @@ -31,6 +31,8 @@ namespace UserpicBuilder { return Images::Round( std::move(i), Images::CornersMask(radius / style::DevicePixelRatio())); + } else { + return std::move(i); } }; if (style::DevicePixelRatio() == 1) {