]> git.saurik.com Git - wxWidgets.git/commitdiff
No changes, just avoid unused variable in wxUSE_TOOLTIPS==0 build.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Dec 2012 16:02:07 +0000 (16:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 28 Dec 2012 16:02:07 +0000 (16:02 +0000)
Move the declaration of a variable only used for tooltip setting inside "#if
wxUSE_TOOLTIPS" test.

Closes #14927.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index f77bcef2e05e1d76d9f1943d86729edaa4f2ef33..1aa4b2569cf6d995885e841a1ca7d02eb73dd003 100644 (file)
@@ -1233,10 +1233,9 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
         }
     }
 
-    wxWindow* wnd = NULL;
-
 #if wxUSE_TOOLTIPS
-   if (evt.Moving() && TabHitTest(evt.m_x, evt.m_y, &wnd))
+    wxWindow* wnd = NULL;
+    if (evt.Moving() && TabHitTest(evt.m_x, evt.m_y, &wnd))
     {
         wxString tooltip(m_pages[GetIdxFromWindow(wnd)].tooltip);
 
@@ -1247,8 +1246,8 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
     }
     else
         UnsetToolTip();
-#endif
-   
+#endif // wxUSE_TOOLTIPS
+
     if (!evt.LeftIsDown() || m_clickPt == wxDefaultPosition)
         return;