X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27db95f05459cad75e705f15750bf4d7d7666713..2d34a3036ee7d4f1d2b6caf8a1e47f67930a430a:/src/common/object.cpp?ds=sidebyside diff --git a/src/common/object.cpp b/src/common/object.cpp index b3c4367ad7..f0ca00964c 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -22,7 +22,8 @@ #endif #ifndef WX_PRECOMP -#include "wx/hash.h" + #include "wx/hash.h" + #include "wx/object.h" #endif #include @@ -43,11 +44,22 @@ #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;