]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/object.cpp
minor fix to find contents file alright
[wxWidgets.git] / src / common / object.cpp
index 5b6593668930e0f7dbce8a482c3407591f5421d7..3e3a612d488dedbd56ce666646560a7bad775658 100644 (file)
@@ -89,10 +89,17 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
 
 wxObject *wxObject::Clone() const
 {
-    return GetClassInfo()->CreateObject();
+    wxObject *object = GetClassInfo()->CreateObject();
+    CopyObject(*object);
+    return object;
 }
 
-#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
+void wxObject::CopyObject(wxObject& object_dest) const
+{
+    wxASSERT(object_dest.GetClassInfo()->IsKindOf(GetClassInfo()));
+}
+
+#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
 void wxObject::Dump(ostream& str)
 {
     if (GetClassInfo() && GetClassInfo()->GetClassName())