From 8afc245422b68b9c24e04b336efda7be872ae31f Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 31 Oct 2020 15:14:16 +0300 Subject: [PATCH] Try to workaround MSVC compiler bug. --- .../SourceFiles/media/player/media_player_panel.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/media/player/media_player_panel.cpp b/Telegram/SourceFiles/media/player/media_player_panel.cpp index fcc7fe2183..f271e32cbe 100644 --- a/Telegram/SourceFiles/media/player/media_player_panel.cpp +++ b/Telegram/SourceFiles/media/player/media_player_panel.cpp @@ -93,13 +93,15 @@ bool Panel::preventAutoHide() const { } void Panel::updateControlsGeometry() { - auto scrollTop = contentTop(); - auto width = contentWidth(); - auto scrollHeight = qMax(height() - scrollTop - contentBottom() - scrollMarginBottom(), 0); + const auto scrollTop = contentTop(); + const auto width = contentWidth(); + const auto scrollHeight = qMax( + height() - scrollTop - contentBottom() - scrollMarginBottom(), + 0); if (scrollHeight > 0) { _scroll->setGeometryToRight(contentRight(), scrollTop, width, scrollHeight); } - if (auto widget = static_cast(_scroll->widget())) { + if (const auto widget = static_cast(_scroll->widget())) { widget->resizeToWidth(width); } }