From 2c20e7bb0223e01a1e4f10c1e4c3e65d3be1ff4f Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 30 Dec 2021 00:19:47 +0300 Subject: [PATCH] Beta version 3.3.2: Fix build with GCC. --- Telegram/SourceFiles/api/api_who_reacted.cpp | 1 - .../boxes/peers/edit_peer_reactions.cpp | 1 - .../history/history_inner_widget.cpp | 1 - .../history/view/history_view_bottom_info.cpp | 1 - .../history/view/history_view_message.cpp | 1 - .../view/history_view_react_button.cpp | 21 ------------------- .../history/view/history_view_reactions.cpp | 1 - .../view/media/history_view_document.cpp | 2 -- .../view/reactions/message_reactions_list.cpp | 1 - 9 files changed, 30 deletions(-) diff --git a/Telegram/SourceFiles/api/api_who_reacted.cpp b/Telegram/SourceFiles/api/api_who_reacted.cpp index d082a9dcd..9fba60879 100644 --- a/Telegram/SourceFiles/api/api_who_reacted.cpp +++ b/Telegram/SourceFiles/api/api_who_reacted.cpp @@ -241,7 +241,6 @@ struct State { [[nodiscard]] rpl::producer> WhoReactedIds( not_null item, not_null context) { - auto unknown = item->history()->session().userPeerId(); auto weak = QPointer(context.get()); const auto session = &item->history()->session(); return [=](auto consumer) { diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp index 69a9ae1c9..2b81a96bb 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_reactions.cpp @@ -76,7 +76,6 @@ void AddReactionIcon( icon->paintRequest( ) | rpl::start_with_next([=] { Painter p(icon); - const auto width = icon->width(); if (!state->image.isNull()) { p.drawImage(0, 0, state->image); } diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 7f81eed58..b51e7d6b7 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -3002,7 +3002,6 @@ void HistoryInner::mouseActionUpdate() { : nullptr; const auto item = view ? view->data().get() : nullptr; if (view) { - const auto was = App::mousedItem(); App::mousedItem(view); m = mapPointToItem(point, view); _reactionsManager->updateButton(reactionButtonParameters( diff --git a/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp b/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp index 2d8e8164a..539d4e2a1 100644 --- a/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp +++ b/Telegram/SourceFiles/history/view/history_view_bottom_info.cpp @@ -127,7 +127,6 @@ void BottomInfo::paint( bool inverted, const PaintContext &context) const { const auto st = context.st; - const auto sti = context.imageStyle(); const auto stm = context.messageStyle(); auto right = position.x() + width(); diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 76714e776..f6875cd8f 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1845,7 +1845,6 @@ Reactions::ButtonParameters Message::reactionButtonParameters( const auto geometry = countGeometry(); result.pointer = position; const auto onTheLeft = (outbg && !delegate()->elementIsChatWide()); - const auto leftAdd = onTheLeft ? 0 : geometry.width(); const auto keyboard = data()->inlineReplyKeyboard(); const auto keyboardHeight = keyboard diff --git a/Telegram/SourceFiles/history/view/history_view_react_button.cpp b/Telegram/SourceFiles/history/view/history_view_react_button.cpp index 23bdf7f46..6546217a2 100644 --- a/Telegram/SourceFiles/history/view/history_view_react_button.cpp +++ b/Telegram/SourceFiles/history/view/history_view_react_button.cpp @@ -56,26 +56,6 @@ constexpr auto kButtonExpandDelay = crl::time(300); return CountMaxSizeWithMargins(st::reactionCornerShadow); } -void CopyImagePart(QImage &to, const QImage &from, QRect source) { - Expects(to.size() == source.size()); - Expects(QRect(QPoint(), from.size()).contains(source)); - Expects(to.format() == from.format()); - Expects(to.bytesPerLine() == to.width() * 4); - - const auto perPixel = 4; - const auto fromPerLine = from.bytesPerLine(); - const auto toPerLine = to.bytesPerLine(); - auto toBytes = reinterpret_cast(to.bits()); - auto fromBytes = reinterpret_cast(from.bits()) - + (source.y() * fromPerLine) - + (source.x() * perPixel); - for (auto y = 0, height = source.height(); y != height; ++y) { - memcpy(toBytes, fromBytes, toPerLine); - toBytes += toPerLine; - fromBytes += fromPerLine; - } -} - } // namespace Button::Button( @@ -673,7 +653,6 @@ void Manager::paintAllEmoji( const auto shift = QPoint(0, oneHeight * (expandUp ? -1 : 1)); auto emojiPosition = mainEmojiPosition + QPoint(0, button->scroll() * (expandUp ? 1 : -1)); - auto index = 0; for (const auto &reaction : _list) { const auto inner = QRectF(_inner).translated(emojiPosition); const auto target = QRectF( diff --git a/Telegram/SourceFiles/history/view/history_view_reactions.cpp b/Telegram/SourceFiles/history/view/history_view_reactions.cpp index 90bce941a..e82712c0a 100644 --- a/Telegram/SourceFiles/history/view/history_view_reactions.cpp +++ b/Telegram/SourceFiles/history/view/history_view_reactions.cpp @@ -176,7 +176,6 @@ void InlineList::paint( const QRect &clip) const { const auto st = context.st; const auto stm = context.messageStyle(); - const auto between = st::reactionBottomBetween; const auto padding = st::reactionBottomPadding; const auto size = st::reactionBottomSize; const auto inbubble = (_data.flags & InlineListData::Flag::InBubble); diff --git a/Telegram/SourceFiles/history/view/media/history_view_document.cpp b/Telegram/SourceFiles/history/view/media/history_view_document.cpp index bd1353dd3..f99f091d6 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_document.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_document.cpp @@ -225,8 +225,6 @@ void Document::fillNamedFromData(HistoryDocumentNamed *named) { } QSize Document::countOptimalSize() { - const auto item = _parent->data(); - auto captioned = Get(); if (_parent->media() != this && !_realParent->groupId()) { if (captioned) { diff --git a/Telegram/SourceFiles/history/view/reactions/message_reactions_list.cpp b/Telegram/SourceFiles/history/view/reactions/message_reactions_list.cpp index d3c5e9f57..e32dbaf25 100644 --- a/Telegram/SourceFiles/history/view/reactions/message_reactions_list.cpp +++ b/Telegram/SourceFiles/history/view/reactions/message_reactions_list.cpp @@ -178,7 +178,6 @@ void Controller::loadMore(const QString &offset) { void Controller::rowClicked(not_null row) { const auto peerId = row->peer()->id; - const auto window = _window; crl::on_main(&session(), [=] { _window->showPeerHistory(peerId); });