From 9a4d2bc8f98b4b903ed94dd65694a793396a3150 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 19 Apr 2022 03:04:03 +0400 Subject: [PATCH] Make processDpi a constexpr and remove unneeded qreal --- Telegram/SourceFiles/core/sandbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 1641a58fc9..c6e6d3c3ea 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -219,8 +219,8 @@ void Sandbox::launchApplication() { } void Sandbox::setupScreenScale() { - const auto processDpi = [](const QDpi &dpi) { - return (dpi.first + dpi.second) * qreal(0.5); + constexpr auto processDpi = [](const QDpi &dpi) { + return (dpi.first + dpi.second) * 0.5; }; const auto dpi = processDpi( Sandbox::primaryScreen()->handle()->logicalDpi());