2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Make processDpi a constexpr and remove unneeded qreal

This commit is contained in:
Ilya Fedin
2022-04-19 03:04:03 +04:00
committed by John Preston
parent 62a2277f43
commit 9a4d2bc8f9

View File

@@ -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());