X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..bd0a76e228b5ce47c648c2e52857e77cf79e6ae5:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index 1443bcfa93..3ac8f6bf6e 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -73,7 +73,7 @@ public: , m_baseInfo1(baseInfo1) , m_baseInfo2(baseInfo2) , m_next(sm_first) - { + { sm_first = this; Register(); } @@ -114,7 +114,7 @@ public: wxDEPRECATED( static void CleanUpClasses() ); #endif static void CleanUp(); - + public: const wxChar *m_className; int m_objectSize; @@ -140,8 +140,8 @@ private: static wxClassInfo *GetBaseByName(const wxChar *name); DECLARE_NO_COPY_CLASS(wxClassInfo) - -protected: + +protected: // registers the class void Register(); void Unregister(); @@ -547,7 +547,11 @@ public: // get the runtime identity of this object wxClassInfo *GetClassInfo() const { - return wx_const_cast(wxClassInfo *, m_classInfo); +#ifdef _MSC_VER + return (wxClassInfo*) m_classInfo; +#else + return wx_const_cast(wxClassInfo *, m_classInfo); +#endif } wxObject* GetSuperClassInstance() const @@ -586,6 +590,9 @@ private : #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS #define new new(__TFILE__,__LINE__) +#elif (defined(__WXDEBUG__) && defined(__VISUALC__) && !wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS) + // Including this file redefines new and allows leak reports to contain line numbers + #include "wx/msw/msvcrt.h" #endif #endif // _WX_OBJECTH__