From 437d8ea8903b01479462c24f1931ba4cc787fa6a Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 30 Aug 2024 17:58:07 +0400 Subject: [PATCH] Fix build with MSVC. --- Telegram/SourceFiles/export/output/export_output_html.cpp | 1 + .../channel_statistics/boosts/create_giveaway_box.cpp | 8 ++++---- Telegram/SourceFiles/ui/effects/credits_graphics.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/export/output/export_output_html.cpp b/Telegram/SourceFiles/export/output/export_output_html.cpp index 822854d589..05b6dc2de6 100644 --- a/Telegram/SourceFiles/export/output/export_output_html.cpp +++ b/Telegram/SourceFiles/export/output/export_output_html.cpp @@ -2141,6 +2141,7 @@ QByteArray HtmlWriter::Wrap::pushGiveaway( return SerializeString( "All winners received gift links in private messages."); } + return QByteArray(); }(); result.append(prize); result.append(popTag()); diff --git a/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp b/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp index 8ce7ff6f1e..45f39faaf6 100644 --- a/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp +++ b/Telegram/SourceFiles/info/channel_statistics/boosts/create_giveaway_box.cpp @@ -455,7 +455,7 @@ void CreateGiveawayBox( return; } constexpr auto kColorIndexCredits = int(1); - constexpr auto kOutdated = 1735689600; + static constexpr auto kOutdated = 1735689600; auto badge = [&] { if (base::unixtime::now() > kOutdated) { @@ -531,9 +531,9 @@ void CreateGiveawayBox( const auto &stStatus = st::defaultTextStyle; const auto buttonInnerSkip = st.height - stButton.height; const auto options = state->apiCreditsOptions.options(); - const auto singleStarWidth = Ui::GenerateStars( - st.nameStyle.font->height, - 1).width() / style::DevicePixelRatio(); + //const auto singleStarWidth = Ui::GenerateStars( + // st.nameStyle.font->height, + // 1).width() / style::DevicePixelRatio(); const auto content = randomCreditsWrap->entity(); const auto title = Ui::AddSubsectionTitle( content, diff --git a/Telegram/SourceFiles/ui/effects/credits_graphics.cpp b/Telegram/SourceFiles/ui/effects/credits_graphics.cpp index f0ac9b682b..e82ec08c12 100644 --- a/Telegram/SourceFiles/ui/effects/credits_graphics.cpp +++ b/Telegram/SourceFiles/ui/effects/credits_graphics.cpp @@ -483,7 +483,7 @@ Fn PaintOutlinedColoredCreditsIconCallback( constexpr auto kPoints = uint(16); constexpr auto kAngleStep = 2. * M_PI / kPoints; constexpr auto kOutlineWidth = 1.6; - constexpr auto kStarShift = 3.8; + // constexpr auto kStarShift = 3.8; constexpr auto kStrokeWidth = 3; const auto starSize = Size(size);