X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e587bb9ec1de95af31e7ccf1e5e0818ff752b0f..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/common/object.cpp diff --git a/src/common/object.cpp b/src/common/object.cpp index c21fdf02f4..fbcd2766b5 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -44,21 +44,20 @@ #if wxUSE_EXTENDED_RTTI const wxClassInfo* wxObject::ms_classParents[] = { NULL } ; - wxObject* wxVariantToObjectConverterwxObject ( wxxVariant &data ) -{ return data.wxTEMPLATED_MEMBER_CALL(Get , wxObject*) ; } - wxObject* wxVariantOfPtrToObjectConverterwxObject ( wxxVariant &data ) -{ return &data.wxTEMPLATED_MEMBER_CALL(Get , wxObject) ; } - wxxVariant wxObjectToVariantConverterwxObject ( wxObject *data ) - { return wxxVariant( dynamic_cast (data) ) ; } +wxObject* wxVariantOfPtrToObjectConverterwxObject ( const wxAny &data ) +{ return wxANY_AS(data, wxObject*); } + wxAny wxObjectToVariantConverterwxObject ( wxObject *data ) + { return wxAny( dynamic_cast (data) ) ; } + wxClassInfo wxObject::ms_classInfo(ms_classParents , wxEmptyString , wxT("wxObject"), (int) sizeof(wxObject), \ (wxObjectConstructorFn) 0 , NULL,NULL,0 , 0 , - 0 , wxVariantOfPtrToObjectConverterwxObject , wxVariantToObjectConverterwxObject , wxObjectToVariantConverterwxObject); - template<> void wxStringReadValue(const wxString & , wxObject * & ){ wxFAIL_MSG("unreachable"); } + 0 , wxVariantOfPtrToObjectConverterwxObject , 0 , wxObjectToVariantConverterwxObject); + template<> void wxStringWriteValue(wxString & , wxObject* const & ){ wxFAIL_MSG("unreachable"); } - template<> void wxStringReadValue(const wxString & , wxObject & ){ wxFAIL_MSG("unreachable"); } template<> void wxStringWriteValue(wxString & , wxObject const & ){ wxFAIL_MSG("unreachable"); } + wxClassTypeInfo s_typeInfo(wxT_OBJECT_PTR , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject*).name() ) ; wxClassTypeInfo s_typeInfowxObject(wxT_OBJECT , &wxObject::ms_classInfo , NULL , NULL , typeid(wxObject).name() ) ; #else @@ -283,8 +282,7 @@ void wxClassInfo::Unregister() sm_classTable->Delete(m_className); if ( sm_classTable->GetCount() == 0 ) { - delete sm_classTable; - sm_classTable = NULL; + wxDELETE(sm_classTable); } } }