From 0e2131e6ebb35a725e26b53bbb68cd70628ceb17 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 30 Nov 2023 20:59:58 +0400 Subject: [PATCH] Version 4.12: Fix build with GCC. --- Telegram/SourceFiles/api/api_chat_participants.cpp | 2 -- Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp | 1 - Telegram/SourceFiles/dialogs/dialogs_row.cpp | 1 - .../history/view/media/history_view_similar_channels.cpp | 5 +---- .../SourceFiles/history/view/media/history_view_web_page.cpp | 1 - .../info/similar_channels/info_similar_channels_widget.cpp | 2 +- .../info/statistics/info_statistics_inner_widget.cpp | 1 - .../SourceFiles/media/stories/media_stories_repost_view.cpp | 1 - Telegram/SourceFiles/statistics/view/bar_chart_view.cpp | 2 -- 9 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Telegram/SourceFiles/api/api_chat_participants.cpp b/Telegram/SourceFiles/api/api_chat_participants.cpp index 583332790..1714d9e2b 100644 --- a/Telegram/SourceFiles/api/api_chat_participants.cpp +++ b/Telegram/SourceFiles/api/api_chat_participants.cpp @@ -216,7 +216,6 @@ void ApplyBotsList( const MTPmessages_Chats &chats) { auto result = ChatParticipants::Channels(); std::vector>(); - auto total = 0; chats.match([&](const auto &data) { const auto &list = data.vchats().v; result.list.reserve(list.size()); @@ -583,7 +582,6 @@ void ChatParticipants::requestSelf(not_null channel) { UserId inviter = -1, TimeId inviteDate = 0, bool inviteViaRequest = false) { - const auto dateChanged = (channel->inviteDate != inviteDate); channel->inviter = inviter; channel->inviteDate = inviteDate; channel->inviteViaRequest = inviteViaRequest; diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 1e5a895dd..7b1010272 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -1097,7 +1097,6 @@ void Controller::fillManageSection() { } if (canEditReactions()) { - const auto session = &_peer->session(); auto allowedReactions = Info::Profile::MigratedOrMeValue( _peer ) | rpl::map([=](not_null peer) { diff --git a/Telegram/SourceFiles/dialogs/dialogs_row.cpp b/Telegram/SourceFiles/dialogs/dialogs_row.cpp index a48cf6daa..aaa03035f 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_row.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_row.cpp @@ -106,7 +106,6 @@ QRect CornerBadgeTTLRect(int photoSize) { } QImage BlurredDarkenedPart(QImage image, QRect part) { - const auto ratio = style::DevicePixelRatio(); auto blurred = Images::BlurLargeImage( std::move(image), kBlurRadius).copy(part); diff --git a/Telegram/SourceFiles/history/view/media/history_view_similar_channels.cpp b/Telegram/SourceFiles/history/view/media/history_view_similar_channels.cpp index 3081fa823..919a76cb0 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_similar_channels.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_similar_channels.cpp @@ -162,7 +162,6 @@ void SimilarChannels::draw(Painter &p, const PaintContext &context) const { path.lineTo(x, y - size); p.fillPath(path, stm->msgBg); } - const auto photo = st::chatSimilarChannelPhoto; const auto padding = st::chatSimilarChannelPadding; p.setClipRect(geometry); _hasHeavyPart = 1; @@ -177,7 +176,6 @@ void SimilarChannels::draw(Painter &p, const PaintContext &context) const { if (subscribing) { channel.subscribed = 1; const auto raw = channel.thumbnail.get(); - const auto view = parent(); channel.thumbnail->subscribeToUpdates([=] { for (const auto &channel : _channels) { if (channel.thumbnail.get() == raw) { @@ -265,7 +263,6 @@ void SimilarChannels::draw(Painter &p, const PaintContext &context) const { st::chatSimilarBadgePadding); auto textLeft = badge.x(); const auto &font = st::chatSimilarBadgeFont; - const auto ascent = font->ascent; const auto textTop = badge.y() + font->ascent; const auto icon = !channel.more ? &st::chatSimilarBadgeIcon @@ -644,4 +641,4 @@ bool SimilarChannels::consumeHorizontalScroll(QPoint position, int delta) { return true; } -} // namespace HistoryView \ No newline at end of file +} // namespace HistoryView diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index 2fc8c043e..b42fca336 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -417,7 +417,6 @@ QSize WebPage::countCurrentSize(int newWidth) { auto siteNameHeight = _siteNameLines ? lineHeight : 0; const auto asSponsored = (!!_sponsoredData); if (asArticle() || asSponsored) { - const auto article = asArticle(); constexpr auto kSponsoredUserpicLines = 2; _pixh = (asSponsored ? kSponsoredUserpicLines : linesMax) * lineHeight; do { diff --git a/Telegram/SourceFiles/info/similar_channels/info_similar_channels_widget.cpp b/Telegram/SourceFiles/info/similar_channels/info_similar_channels_widget.cpp index 14474faf9..886a7869e 100644 --- a/Telegram/SourceFiles/info/similar_channels/info_similar_channels_widget.cpp +++ b/Telegram/SourceFiles/info/similar_channels/info_similar_channels_widget.cpp @@ -240,7 +240,7 @@ void ListController::restoreState( auto typeErasedState = state ? state->controllerState.get() : nullptr; - if (auto my = dynamic_cast(typeErasedState)) { + if (dynamic_cast(typeErasedState)) { PeerListController::restoreState(std::move(state)); } } diff --git a/Telegram/SourceFiles/info/statistics/info_statistics_inner_widget.cpp b/Telegram/SourceFiles/info/statistics/info_statistics_inner_widget.cpp index 29d0ff3a7..ca77f7ad5 100644 --- a/Telegram/SourceFiles/info/statistics/info_statistics_inner_widget.cpp +++ b/Telegram/SourceFiles/info/statistics/info_statistics_inner_widget.cpp @@ -684,7 +684,6 @@ void InnerWidget::fill() { FillStatistic(inner, descriptor, _state.stats); const auto &channel = _state.stats.channel; const auto &supergroup = _state.stats.supergroup; - const auto &message = _state.stats.message; if (channel) { fillRecentPosts(); } else if (supergroup) { diff --git a/Telegram/SourceFiles/media/stories/media_stories_repost_view.cpp b/Telegram/SourceFiles/media/stories/media_stories_repost_view.cpp index 75bddd008..6b65ea45b 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_repost_view.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_repost_view.cpp @@ -118,7 +118,6 @@ void RepostView::draw(Painter &p, int x, int y, int availableWidth) { } } - const auto pausedSpoiler = On(PowerSaving::kChatSpoiler); if (w > st::historyReplyPadding.left()) { const auto textw = w - st::historyReplyPadding.left() diff --git a/Telegram/SourceFiles/statistics/view/bar_chart_view.cpp b/Telegram/SourceFiles/statistics/view/bar_chart_view.cpp index d5ec29fb8..5e75d4d05 100644 --- a/Telegram/SourceFiles/statistics/view/bar_chart_view.cpp +++ b/Telegram/SourceFiles/statistics/view/bar_chart_view.cpp @@ -155,7 +155,6 @@ void BarChartView::paintSelectedXIndex( auto o = ScopedPainterOpacity(p, progress); p.setBrush(st::boxBg); const auto r = st::statisticsDetailsDotRadius; - const auto i = selectedXIndex; const auto isSameToken = _selectedPoints.isSame(selectedXIndex, c); auto linePainted = false; @@ -178,7 +177,6 @@ void BarChartView::paintSelectedXIndex( / float64(c.heightLimits.max - c.heightLimits.min); const auto yPoint = (1. - yPercentage) * c.rect.height(); - const auto bottomIndex = x - localStart; const auto column = QRectF( leftStart + (x - localStart) * w, c.rect.height() - 0 - yPoint,