Replace node deletion with Erase

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-10-22 08:05:19 +00:00
parent 39a1c2f2dd
commit efbf673503

View File

@ -174,9 +174,10 @@ bool wxRichTextCompositeObject::RemoveChild(wxRichTextObject* child, bool delete
wxRichTextObjectList::compatibility_iterator node = m_children.Find(child);
if (node)
{
wxRichTextObject* obj = node->GetData();
m_children.Erase(node);
if (deleteChild)
delete node->GetData();
delete node;
delete obj;
return true;
}
@ -195,7 +196,7 @@ bool wxRichTextCompositeObject::DeleteChildren()
child->Dereference(); // Only delete if reference count is zero
node = node->GetNext();
delete oldNode;
m_children.Erase(oldNode);
}
return true;