Fix build with MSVC.

This commit is contained in:
John Preston 2023-02-01 10:04:11 +04:00
parent 7a63246e6c
commit edb011dc0d
2 changed files with 3 additions and 1 deletions

View file

@ -444,7 +444,7 @@ void Cover::refreshUploadPhotoOverlay() {
}(), [=](Ui::UserpicButton::ChosenImage chosen) { }(), [=](Ui::UserpicButton::ChosenImage chosen) {
using ChosenType = Ui::UserpicButton::ChosenType; using ChosenType = Ui::UserpicButton::ChosenType;
auto result = Api::PeerPhoto::UserPhoto{ auto result = Api::PeerPhoto::UserPhoto{
base::take(chosen.image), base::take<QImage>(chosen.image), // Strange MSVC bug with take.
chosen.markup.documentId, chosen.markup.documentId,
chosen.markup.colors, chosen.markup.colors,
}; };

View file

@ -31,6 +31,8 @@ namespace UserpicBuilder {
return Images::Round( return Images::Round(
std::move(i), std::move(i),
Images::CornersMask(radius / style::DevicePixelRatio())); Images::CornersMask(radius / style::DevicePixelRatio()));
} else {
return std::move(i);
} }
}; };
if (style::DevicePixelRatio() == 1) { if (style::DevicePixelRatio() == 1) {