X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edf0993cae024ed0e298608184d8dbc0063620af..e83ecba968c94965523be449a56fffcf4c55010b:/src/common/object.cpp?ds=sidebyside diff --git a/src/common/object.cpp b/src/common/object.cpp index b3b09abf92..7148e579b3 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -82,7 +82,6 @@ void wxObject::Dump(wxSTD ostream& str) #endif - #ifdef _WX_WANT_NEW_SIZET_WXCHAR_INT void *wxObject::operator new ( size_t size, const wxChar *fileName, int lineNum ) { @@ -247,9 +246,18 @@ wxObject *wxCreateDynamicObject(const wxChar *name) // ---------------------------------------------------------------------------- -// wxClassInfo +// wxObject // ---------------------------------------------------------------------------- +// Initialize ref data from another object (needed for copy constructor and +// assignment operator) +void wxObject::InitFrom(const wxObject& other) +{ + m_refData = other.m_refData; + if ( m_refData ) + m_refData->m_count++; +} + void wxObject::Ref(const wxObject& clone) { #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT