From af7a6ed2d0eaa004740598617d890f14c30f4ed9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 21 Jul 2020 17:09:43 +0200 Subject: [PATCH] Combine variable declaration and test in a single line No real changes, make the code slightly shorter. --- src/osx/window_osx.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 0aac85e24a..5520e1ba5f 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -2621,10 +2621,8 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event ) wxSize wxWindowMac::GetDPI() const { - wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ; - double scaleFactor; - if ( tlw ) + if ( wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ) scaleFactor = tlw->GetContentScaleFactor(); else scaleFactor = wxOSXGetMainScreenContentScaleFactor();