X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/684242c6d81bdde114bb8fcd65249b8fe0b05839..53e112a093bb479c8032fad7467690196c67c2c6:/include/wx/object.h diff --git a/include/wx/object.h b/include/wx/object.h index 2892637645..dc7a6a729e 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -72,16 +72,7 @@ public: , m_baseInfo1(0) , m_baseInfo2(0) , m_next(sm_first) - { -#ifdef __WXDEBUG__ - if (sm_classTable != NULL) { - wxString msg(_T("too late binding of class info (lazy binding) for ")); - msg += className; - wxFAIL_MSG(msg); - } -#endif - sm_first = this; - } + { sm_first = this; } wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; } @@ -411,12 +402,29 @@ inline void wxCheckCast(void *ptr) class WXDLLEXPORT wxObject { DECLARE_ABSTRACT_CLASS(wxObject) - DECLARE_NO_COPY_CLASS(wxObject) +private: + void InitFrom(const wxObject& other); + public: wxObject() { m_refData = NULL; } virtual ~wxObject() { UnRef(); } + wxObject(const wxObject& other) + { + InitFrom(other); + } + + wxObject& operator=(const wxObject& other) + { + if ( this != &other ) + { + UnRef(); + InitFrom(other); + } + return *this; + } + bool IsKindOf(wxClassInfo *info) const;