X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..5c836c463a8ece980b66ebc9920f1b045d9a8f33:/include/wx/object.h?ds=sidebyside diff --git a/include/wx/object.h b/include/wx/object.h index 1443bcfa93..84e258463a 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