]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
Remove incorrect and unnecessary wxEntryCleanup declaration.
[wxWidgets.git] / src / common / object.cpp
index b3c4367ad750a2b95a815fca3b355cf5d2b874a7..f0ca00964c7a5ddef01f7896205f46e45c88d76d 100644 (file)
@@ -22,7 +22,8 @@
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/hash.h"
+    #include "wx/hash.h"
+    #include "wx/object.h"
 #endif
 
 #include <string.h>
     #endif
 #endif // __WXDEBUG__ || wxUSE_DEBUG_CONTEXT
 
+// we must disable optimizations for VC.NET because otherwise its too eager
+// linker discards wxClassInfo objects in release build thus breaking many,
+// many things
+#if defined __VISUALC__ && __VISUALC__ >= 1300
+    #pragma optimize("", off)
+#endif
 
 wxClassInfo wxObject::sm_classwxObject( wxT("wxObject"), 0, 0,
                                         (int) sizeof(wxObject),
                                         (wxObjectConstructorFn) 0 );
 
+// restore optimizations
+#if defined __VISUALC__ && __VISUALC__ >= 1300
+    #pragma optimize("", on)
+#endif
+
 wxClassInfo* wxClassInfo::sm_first = NULL;
 wxHashTable* wxClassInfo::sm_classTable = NULL;