Combine variable declaration and test in a single line
No real changes, make the code slightly shorter.
This commit is contained in:
@@ -2621,10 +2621,8 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event )
|
|||||||
|
|
||||||
wxSize wxWindowMac::GetDPI() const
|
wxSize wxWindowMac::GetDPI() const
|
||||||
{
|
{
|
||||||
wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ;
|
|
||||||
|
|
||||||
double scaleFactor;
|
double scaleFactor;
|
||||||
if ( tlw )
|
if ( wxNonOwnedWindow* tlw = MacGetTopLevelWindow() )
|
||||||
scaleFactor = tlw->GetContentScaleFactor();
|
scaleFactor = tlw->GetContentScaleFactor();
|
||||||
else
|
else
|
||||||
scaleFactor = wxOSXGetMainScreenContentScaleFactor();
|
scaleFactor = wxOSXGetMainScreenContentScaleFactor();
|
||||||
|
Reference in New Issue
Block a user