From 9c74f1329e7a7949e335633f47cd9c0b984a8c84 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 13:35:34 +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/trunk@77461 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 2f44b86799..904ce7f0af 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 ) ;