diff --git a/Telegram/SourceFiles/boxes/background_preview_box.cpp b/Telegram/SourceFiles/boxes/background_preview_box.cpp index 4f46697c1a..db72d5690f 100644 --- a/Telegram/SourceFiles/boxes/background_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/background_preview_box.cpp @@ -57,7 +57,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { constexpr auto kMaxWallPaperSlugLength = 255; -constexpr auto kDefaultDimming = 50; [[nodiscard]] bool IsValidWallPaperSlug(const QString &slug) { if (slug.isEmpty() || slug.size() > kMaxWallPaperSlugLength) { diff --git a/Telegram/SourceFiles/boxes/gift_premium_box.cpp b/Telegram/SourceFiles/boxes/gift_premium_box.cpp index 92c6862fdd..63603f6d21 100644 --- a/Telegram/SourceFiles/boxes/gift_premium_box.cpp +++ b/Telegram/SourceFiles/boxes/gift_premium_box.cpp @@ -62,7 +62,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { -constexpr auto kDiscountDivider = 5.; constexpr auto kUserpicsMax = size_t(3); using GiftOption = Data::SubscriptionOption; diff --git a/Telegram/SourceFiles/boxes/premium_preview_box.cpp b/Telegram/SourceFiles/boxes/premium_preview_box.cpp index 92240b424a..06835d6037 100644 --- a/Telegram/SourceFiles/boxes/premium_preview_box.cpp +++ b/Telegram/SourceFiles/boxes/premium_preview_box.cpp @@ -51,8 +51,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { constexpr auto kPremiumShift = 21. / 240; -constexpr auto kReactionsPerRow = 5; -constexpr auto kDisabledOpacity = 0.5; constexpr auto kToggleStickerTimeout = 2 * crl::time(1000); constexpr auto kStarOpacityOff = 0.1; constexpr auto kStarOpacityOn = 1.; diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp index 26a9cbed0d..946c6dca8e 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_opengl.cpp @@ -321,9 +321,6 @@ void Viewport::RendererGL::init( _frameBuffer->bind(); _frameBuffer->allocate(kValues * sizeof(GLfloat)); _downscaleProgram.yuv420.emplace(); - const auto downscaleVertexSource = VertexShader({ - VertexPassTextureCoord(), - }); _downscaleVertexShader = LinkProgram( &*_downscaleProgram.yuv420, VertexShader({ diff --git a/Telegram/SourceFiles/data/data_download_manager.cpp b/Telegram/SourceFiles/data/data_download_manager.cpp index 1d7ea12af0..cd736e9e7f 100644 --- a/Telegram/SourceFiles/data/data_download_manager.cpp +++ b/Telegram/SourceFiles/data/data_download_manager.cpp @@ -889,7 +889,6 @@ not_null DownloadManager::generateItem( const auto replyTo = FullReplyTo(); const auto viaBotId = UserId(); const auto date = base::unixtime::now(); - const auto postAuthor = QString(); const auto caption = TextWithEntities(); const auto make = [&](const auto media) { return history->makeMessage( diff --git a/Telegram/SourceFiles/data/data_forum_icons.cpp b/Telegram/SourceFiles/data/data_forum_icons.cpp index 1469cf5596..c47c8e669c 100644 --- a/Telegram/SourceFiles/data/data_forum_icons.cpp +++ b/Telegram/SourceFiles/data/data_forum_icons.cpp @@ -15,13 +15,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "apiwrap.h" namespace Data { -namespace { - -constexpr auto kRefreshDefaultListEach = 60 * 60 * crl::time(1000); -constexpr auto kRecentRequestTimeout = 10 * crl::time(1000); -constexpr auto kMaxTimeout = 6 * 60 * 60 * crl::time(1000); - -} // namespace ForumIcons::ForumIcons(not_null owner) : _owner(owner) diff --git a/Telegram/SourceFiles/data/data_photo_media.cpp b/Telegram/SourceFiles/data/data_photo_media.cpp index 0b66e192a7..af01588f45 100644 --- a/Telegram/SourceFiles/data/data_photo_media.cpp +++ b/Telegram/SourceFiles/data/data_photo_media.cpp @@ -226,7 +226,6 @@ bool PhotoMedia::setToClipboard() { if (fallback.isNull()) { return false; } - const auto bytes = imageBytes(large); auto mime = std::make_unique(); mime->setImageData(std::move(fallback)); if (auto bytes = imageBytes(large); !bytes.isEmpty()) { diff --git a/Telegram/SourceFiles/data/data_stories.cpp b/Telegram/SourceFiles/data/data_stories.cpp index d3baee3bb8..abf9227fd7 100644 --- a/Telegram/SourceFiles/data/data_stories.cpp +++ b/Telegram/SourceFiles/data/data_stories.cpp @@ -1290,7 +1290,6 @@ void Stories::sendIncrementViewsRequests() { if (_incrementViewsPending.empty()) { return; } - auto ids = QVector(); struct Prepared { PeerId peer = 0; QVector ids; diff --git a/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp b/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp index 123621b37d..1f80c53f63 100644 --- a/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp +++ b/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp @@ -349,7 +349,6 @@ void CustomEmojiLoader::check() { const auto tag = _tag; const auto sizeOverride = int(_sizeOverride); const auto size = FrameSizeFromTag(_tag, _sizeOverride); - auto bytes = Lottie::ReadContent(data, filepath); auto loader = [=] { return std::make_unique( document, diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp index cda8da94d4..e6a93af3af 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_stories_list.cpp @@ -36,7 +36,6 @@ constexpr auto kCollapseAfterRatio = 0.68; constexpr auto kFrictionRatio = 0.15; constexpr auto kExpandCatchUpDuration = crl::time(200); constexpr auto kMaxTooltipNames = 3; -constexpr auto kStoriesTooltipHideBgOpacity = 0.2; [[nodiscard]] int AvailableNameWidth(const style::DialogsStoriesList &st) { const auto &full = st.full; diff --git a/Telegram/SourceFiles/export/output/export_output_json.cpp b/Telegram/SourceFiles/export/output/export_output_json.cpp index 9a5f5b3d6e..dc23fd38f1 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.cpp +++ b/Telegram/SourceFiles/export/output/export_output_json.cpp @@ -446,7 +446,6 @@ QByteArray SerializeMessage( pushAction("send_payment"); push("amount", data.amount); push("currency", data.currency); - const auto amount = FormatMoneyAmount(data.amount, data.currency); pushReplyToMsgId("invoice_message_id"); if (data.recurringUsed) { push("recurring", "used"); diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index 84be6934d0..fb6f950e0a 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -442,7 +442,6 @@ void InnerWidget::applyFilter(FilterValue &&value) { } void InnerWidget::applySearch(const QString &query) { - auto clearQuery = query.trimmed(); if (_searchQuery != query) { _searchQuery = query; clearAndRequestLog(); diff --git a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp index 345512ea18..91ad934843 100644 --- a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp +++ b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp @@ -28,7 +28,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace HistoryView::Reactions { namespace { -constexpr auto kDivider = 4; constexpr auto kToggleDuration = crl::time(120); constexpr auto kActivateDuration = crl::time(150); constexpr auto kExpandDuration = crl::time(300); diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp index a2f342d283..a8135979bd 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_send_data.cpp @@ -84,7 +84,6 @@ SendDataCommon::SentMessageFields SendGeo::getSentMessageFields() const { } SendDataCommon::SentMessageFields SendVenue::getSentMessageFields() const { - const auto venueType = QString(); return { .media = MTP_messageMediaVenue( _location.toMTP(), MTP_string(_title), diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp index 3f4671749d..fd956e5f62 100644 --- a/Telegram/SourceFiles/media/audio/media_audio.cpp +++ b/Telegram/SourceFiles/media/audio/media_audio.cpp @@ -36,7 +36,6 @@ namespace { constexpr auto kSuppressRatioAll = 0.2; constexpr auto kSuppressRatioSong = 0.05; constexpr auto kWaveformCounterBufferSize = 256 * 1024; -constexpr auto kEffectDestructionDelay = crl::time(1000); QMutex AudioMutex; ALCdevice *AudioDevice = nullptr; diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 638698515c..c533fd805d 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -4879,7 +4879,6 @@ void OverlayWidget::paintControls( const style::icon &icon; bool nonbright = false; }; - const QRect kEmpty; // When adding / removing controls please update RendererGL. const Control controls[] = { { diff --git a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp index a8f6c3d639..ae68d8bdde 100644 --- a/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp +++ b/Telegram/SourceFiles/payments/ui/payments_form_summary.cpp @@ -388,7 +388,6 @@ void FormSummary::setupSuggestedTips(not_null layout) { st::paymentsTipButtonsPadding); const auto state = outer->lifetime().make_state(); for (const auto amount : _invoice.suggestedTips) { - const auto text = formatAmount(amount, true); const auto selected = (amount == _invoice.tipsSelected); const auto &st = selected ? _tipChosen diff --git a/Telegram/SourceFiles/settings/settings_websites.cpp b/Telegram/SourceFiles/settings/settings_websites.cpp index a963a0488e..bff91b1554 100644 --- a/Telegram/SourceFiles/settings/settings_websites.cpp +++ b/Telegram/SourceFiles/settings/settings_websites.cpp @@ -32,7 +32,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { constexpr auto kShortPollTimeout = 60 * crl::time(1000); -constexpr auto kMaxDeviceModelLength = 32; using EntryData = Api::Websites::Entry; diff --git a/Telegram/SourceFiles/statistics/statistics_data_deserialize.cpp b/Telegram/SourceFiles/statistics/statistics_data_deserialize.cpp index 09fb3aa93e..9c3c90274d 100644 --- a/Telegram/SourceFiles/statistics/statistics_data_deserialize.cpp +++ b/Telegram/SourceFiles/statistics/statistics_data_deserialize.cpp @@ -136,7 +136,6 @@ Data::StatisticalChart StatisticalChartFromJSON(const QByteArray &json) { const auto colors = root.value(u"colors"_q).toObject(); const auto names = root.value(u"names"_q).toObject(); - const auto colorPattern = u"(.*)(#.*)"_q; for (auto &line : result.lines) { const auto colorIt = colors.constFind(line.idString); if (colorIt != colors.constEnd() && (*colorIt).isString()) { diff --git a/Telegram/SourceFiles/storage/storage_media_prepare.cpp b/Telegram/SourceFiles/storage/storage_media_prepare.cpp index 362455cacd..17ebe996f3 100644 --- a/Telegram/SourceFiles/storage/storage_media_prepare.cpp +++ b/Telegram/SourceFiles/storage/storage_media_prepare.cpp @@ -132,7 +132,6 @@ MimeDataState ComputeMimeDataState(const QMimeData *data) { return MimeDataState::None; } - auto files = QStringList(); auto allAreSmallImages = true; for (const auto &url : urls) { if (!url.isLocalFile()) { diff --git a/Telegram/SourceFiles/support/support_templates.cpp b/Telegram/SourceFiles/support/support_templates.cpp index ccfac3bf12..cb1515ee30 100644 --- a/Telegram/SourceFiles/support/support_templates.cpp +++ b/Telegram/SourceFiles/support/support_templates.cpp @@ -518,7 +518,6 @@ void Templates::ensureUpdatesCreated() { } void Templates::update() { - auto errors = QStringList(); const auto sendRequest = [&](const QString &path, const QString &url) { ensureUpdatesCreated(); if (_updates->requests.find(path) != end(_updates->requests)) { diff --git a/Telegram/SourceFiles/ui/controls/silent_toggle.cpp b/Telegram/SourceFiles/ui/controls/silent_toggle.cpp index 2968c80fd8..9c5f88401d 100644 --- a/Telegram/SourceFiles/ui/controls/silent_toggle.cpp +++ b/Telegram/SourceFiles/ui/controls/silent_toggle.cpp @@ -16,11 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_chat_helpers.h" namespace Ui { -namespace { - -constexpr auto kAnimationDuration = crl::time(120); - -} // namespace SilentToggle::SilentToggle(QWidget *parent, not_null channel) : RippleButton(parent, st::historySilentToggle.ripple) diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 440703d2fa..e0dc8d1937 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -900,7 +900,6 @@ TextWithEntities Manager::ComposeReactionEmoji( return TextWithEntities{ *emoji }; } const auto id = v::get(reaction.data); - auto entities = EntitiesInText(); const auto document = session->data().document(id); const auto sticker = document->sticker(); const auto text = sticker ? sticker->alt : PlaceholderReactionText();