]> git.saurik.com Git - wxWidgets.git/commitdiff
Eliminated bizarre VC++ internal compiler errors, perhaps related to
authorJulian Smart <julian@anthemion.co.uk>
Sun, 24 Aug 2003 14:30:23 +0000 (14:30 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 24 Aug 2003 14:30:23 +0000 (14:30 +0000)
enabling C++ RTTI

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

src/common/statbar.cpp
src/msw/statbr95.cpp

index 238802c0c2ecf0138780a448bb1966087cc869d7..984a9e127828edad75530babd3fb9060908c7c2c 100644 (file)
@@ -250,7 +250,11 @@ void wxStatusBarBase::FreeStacks()
 void wxStatusBarBase::PushStatusText(const wxString& text, int number)
 {
     wxListString* st = GetOrCreateStatusStack(number);
-    st->Insert(new wxString(GetStatusText(number)));
+    // This long-winded way around avoids an internal compiler error
+    // in VC++ 6 with RTTI enabled
+    wxString tmp1(GetStatusText(number));
+    wxString* tmp = new wxString(tmp1);
+    st->Insert(tmp);
     SetStatusText(text, number);
 }
 
index 058f3b6f358b361a2d76564935621166c8ec0478..3b203df0b0425507e547b35fbd3aedbde11f0d37 100644 (file)
@@ -250,7 +250,7 @@ void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height)
     // omitted because for normal status bars (positioned along the bottom
     // edge) the position is already set correctly, but if the user wants to
     // position them in some exotic location, this is really needed
-    wxWindow::DoMoveWindow(x, y, width, height);
+    wxWindowMSW::DoMoveWindow(x, y, width, height);
 
     // adjust fields widths to the new size
     SetFieldsWidth();