From 0484aa12e2d27bf45517626e828d5dcc09b3c411 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 13:30:00 +0000 Subject: [PATCH] Avoid warning about unused variable in wxiOS build. Define variable only used if wxOSX_USE_COCOA_OR_CARBON inside the check for it. Closes #16435. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/window_osx.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 747de71f67..89fa0cc19c 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -1607,8 +1607,6 @@ void wxWindowMac::MacPaintBorders( int WXUNUSED(leftOrigin) , int WXUNUSED(right if ( IsTopLevel() ) return ; - bool hasFocus = GetPeer()->NeedsFocusRect() && HasFocus(); - // back to the surrounding frame rectangle int tx,ty,tw,th; @@ -1616,8 +1614,9 @@ void wxWindowMac::MacPaintBorders( int WXUNUSED(leftOrigin) , int WXUNUSED(right GetPeer()->GetPosition( tx, ty ); #if wxOSX_USE_COCOA_OR_CARBON - { + const bool hasFocus = GetPeer()->NeedsFocusRect() && HasFocus(); + CGRect cgrect = CGRectMake( tx-1 , ty-1 , tw+2 , th+2 ) ;