]> git.saurik.com Git - wxWidgets.git/commitdiff
A slightly better compilation fix after PCH-less build breakage in r64126.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Apr 2010 16:59:09 +0000 (16:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Apr 2010 16:59:09 +0000 (16:59 +0000)
Include wx/frame.h header instead of casting wxFrame to wxWindow using C style
cast. Although this does work now and probably will work later too it seems
better to not use the cast nevertheless.

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

src/common/menucmn.cpp

index dc9db4f268176eac4de935ba6536a549394ad2a7..883870a71423de9300355c7161bb742f1c80d6f5 100644 (file)
@@ -30,6 +30,7 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/menu.h"
+    #include "wx/frame.h"
 #endif
 
 #include "wx/stockitem.h"
@@ -529,7 +530,7 @@ wxWindow *wxMenuBase::GetInvokingWindow() const
 
 wxWindow *wxMenuBase::GetWindow() const
 {
-    return GetMenuBar() ? (wxWindow*)GetMenuBar()->GetFrame() : GetInvokingWindow();
+    return GetMenuBar() ? GetMenuBar()->GetFrame() : GetInvokingWindow();
 }
 
 // ----------------------------------------------------------------------------