X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5232d996cd3f27d49ea49708f0983445428cf6ce..ce321570b08e1a2937415ef6388a1a98fd1c4b83:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index be84989431..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(); @@ -416,7 +416,7 @@ inline void* wxCheckCast(void *ptr) #endif // WXDEBUG && wxUSE_MEMORY_TRACING // ---------------------------------------------------------------------------- -// wxObject: the root class of wxWindows object hierarchy +// wxObject: the root class of wxWidgets object hierarchy // ---------------------------------------------------------------------------- class WXDLLIMPEXP_BASE wxObject @@ -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