X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d7836c47de679f03b1b7e738c77164c11bd3689..623d5f80029803f1394e89732e16e19e82a22e2a:/src/richtext/richtextstyles.cpp?ds=sidebyside diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index e1dd06b17e..1a4d342fca 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -16,20 +16,19 @@ #pragma hdrstop #endif +#if wxUSE_RICHTEXT + +#include "wx/richtext/richtextstyles.h" + #ifndef WX_PRECOMP #include "wx/wx.h" #endif -#include "wx/image.h" - -#if wxUSE_RICHTEXT - #include "wx/filename.h" #include "wx/clipbrd.h" #include "wx/wfstream.h" #include "wx/module.h" -#include "wx/richtext/richtextstyles.h" #include "wx/richtext/richtextctrl.h" IMPLEMENT_CLASS(wxRichTextStyleDefinition, wxObject) @@ -58,11 +57,11 @@ bool wxRichTextStyleSheet::AddStyle(wxList& list, wxRichTextStyleDefinition* def /// Remove a style bool wxRichTextStyleSheet::RemoveStyle(wxList& list, wxRichTextStyleDefinition* def, bool deleteStyle) { - wxNode* node = list.Find(def); + wxList::compatibility_iterator node = list.Find(def); if (node) { wxRichTextStyleDefinition* def = (wxRichTextStyleDefinition*) node->GetData(); - delete node; + list.Erase(node); if (deleteStyle) delete def; return true; @@ -74,7 +73,7 @@ bool wxRichTextStyleSheet::RemoveStyle(wxList& list, wxRichTextStyleDefinition* /// Find a definition by name wxRichTextStyleDefinition* wxRichTextStyleSheet::FindStyle(const wxList& list, const wxString& name) const { - for (wxNode* node = list.GetFirst(); node; node = node->GetNext()) + for (wxList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext()) { wxRichTextStyleDefinition* def = (wxRichTextStyleDefinition*) node->GetData(); if (def->GetName().Lower() == name.Lower())