]> git.saurik.com Git - wxWidgets.git/commitdiff
More Erase substitutions
authorJulian Smart <julian@anthemion.co.uk>
Sat, 22 Oct 2005 09:24:49 +0000 (09:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 22 Oct 2005 09:24:49 +0000 (09:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 619ae82058a525ac42011c64ed6f5f715d067c1b..56a3a6812cf4c6c137412ecd99f51f3d3f6d8ccd 100644 (file)
@@ -370,7 +370,7 @@ bool wxRichTextCompositeObject::Defragment()
             if (child->CanMerge(nextChild) && child->Merge(nextChild))
             {
                 nextChild->Dereference();
-                delete node->GetNext();
+                m_children.Erase(node->GetNext());
 
                 // Don't set node -- we'll see if we can merge again with the next
                 // child.
@@ -1352,7 +1352,7 @@ bool wxRichTextParagraphLayoutBox::DeleteRange(const wxRichTextRange& range)
                             }
 
                             wxRichTextObjectList::compatibility_iterator next1 = node1->GetNext();
-                            delete node1;
+                            nextParagraph->GetChildren().Erase(node1);
 
                             node1 = next1;
                         }
@@ -3418,7 +3418,7 @@ bool wxRichTextBuffer::EndStyle()
 
     wxNode* node = m_attributeStack.GetLast();
     wxTextAttrEx* attr = (wxTextAttrEx*)node->GetData();
-    delete node;
+    m_attributeStack.Erase(node);
 
     SetDefaultStyle(*attr);