Skip to content

Commit

Permalink
Version 5.2: Fix build with GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jun 30, 2024
1 parent 7eb98b5 commit 707951a
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 22 deletions.
10 changes: 0 additions & 10 deletions Telegram/SourceFiles/api/api_credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ constexpr auto kTransactionsLimit = 100;
}, [](const auto &) {
return PeerId(0);
}).value;
const auto isBot = [&] {
if (barePeerId) {
if (const auto p = peer->owner().peer(PeerId(barePeerId))) {
if (const auto u = p->asUser()) {
return u->isBot();
}
}
}
return false;
}();
return Data::CreditsHistoryEntry{
.id = qs(tl.data().vid()),
.title = qs(tl.data().vtitle().value_or_empty()),
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,6 @@ void Controller::fillBotBalanceButton() {
const auto icon = Ui::CreateChild<Ui::RpWidget>(button);
icon->resize(Size(st::menuIconLinks.width() - kSizeShift));

const auto bg = st::boxBg->c;
auto colorized = [&] {
auto f = QFile(Ui::Premium::Svg());
if (!f.open(QIODevice::ReadOnly)) {
Expand Down
2 changes: 0 additions & 2 deletions Telegram/SourceFiles/boxes/send_files_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ void EditPriceBox(
not_null<Main::Session*> session,
uint64 price,
Fn<void(uint64)> apply) {
const auto owner = &session->data();
box->setTitle(tr::lng_paid_title());
AddSubsectionTitle(
box->verticalLayout(),
Expand Down Expand Up @@ -837,7 +836,6 @@ QImage SendFilesBox::preparePriceTagBg(QSize size) const {
bg = QImage(ratio, ratio, QImage::Format_ARGB32_Premultiplied);
bg.fill(Qt::black);
}
const auto bgSize = bg.size() / bg.devicePixelRatio();

auto result = QImage(size * ratio, QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(ratio);
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/data/data_media_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2008,7 +2008,6 @@ ItemPreview MediaInvoice::toPreview(ToPreviewOptions options) const {
return Media::toPreview(options);
}
auto counts = AlbumCounts();
const auto item = parent();
auto images = std::vector<ItemPreviewImage>();
auto context = std::vector<std::any>();
const auto existing = options.existing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ void InnerWidget::fill() {
const auto container = this;
const auto &data = _state;
const auto multiplier = data.usdRate * Data::kEarnMultiplier;
const auto session = &_peer->session();

auto availableBalanceValue = rpl::single(
data.availableBalance
Expand Down Expand Up @@ -192,7 +191,7 @@ void InnerWidget::fill() {
Ui::ToggleChildrenVisibility(line, true);

Ui::AddSkip(container);
const auto sub = container->add(
container->add(
object_ptr<Ui::FlatLabel>(
container,
text(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,6 @@ void InnerWidget::load() {
rpl::lifetime apiPremiumBotLifetime;
};
const auto state = lifetime().make_state<State>(_peer);
const auto api = lifetime().make_state<Api::ChannelEarnStatistics>(
_peer->asChannel());
const auto apiCredits = lifetime().make_state<Api::CreditsEarnStatistics>(
_peer);

Info::Statistics::FillLoading(
this,
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/window/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,6 @@ WindowPosition MainWindow::nextInitialChildPosition(SeparateId childId) {
const auto adjust = [&](int value) {
return (value * 3 / 4);
};
const auto secondaryWithChatsList = !childId.primary() && childId.hasChatsList();
const auto width = OptionNewWindowsSizeAsFirst.value()
? Core::App().settings().windowPosition().w
: childId.primary()
Expand Down
1 change: 0 additions & 1 deletion Telegram/SourceFiles/window/window_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ void Controller::showAccount(
MsgId singlePeerShowAtMsgId) {
Expects(isPrimary() || _id.account == account);

const auto prevAccount = _id.account;
const auto prevSession = maybeSession();
const auto prevSessionUniqueId = prevSession
? prevSession->uniqueId()
Expand Down

0 comments on commit 707951a

Please sign in to comment.