]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/statbar.cpp
String corrections
[wxWidgets.git] / src / common / statbar.cpp
index 3867476a71537b658ec772a4d4eb7ad34490e1d2..984a9e127828edad75530babd3fb9060908c7c2c 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "statbar.h"
 #endif
 
@@ -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);
 }