diff --git a/include/wx/list.h b/include/wx/list.h index 247b602e34..43316ca914 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -1053,6 +1053,20 @@ WX_DECLARE_LIST_XO(wxString, wxStringListBase, class WXDLLEXPORT); class WXDLLEXPORT wxStringList : public wxStringListBase { public: + compatibility_iterator Append(wxChar* s) + { wxString tmp = s; delete[] s; return wxStringListBase::Append(tmp); } + compatibility_iterator Insert(wxChar* s) + { wxString tmp = s; delete[] s; return wxStringListBase::Insert(tmp); } + compatibility_iterator Insert(size_t pos, wxChar* s) + { + wxString tmp = s; + delete[] s; + return wxStringListBase::Insert(pos, tmp); + } + compatibility_iterator Add(const wxChar* s) + { push_back(s); return GetLast(); } + compatibility_iterator Prepend(const wxChar* s) + { push_front(s); return GetFirst(); } }; #endif // wxUSE_STL diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 3ccac13183..41e11eb45c 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -255,7 +255,7 @@ static inline wxChar* MYcopystring(const wxChar* s) void wxPathList::Add (const wxString& path) { - wxStringList::Append (WXSTRINGCAST path); + wxStringList::Add (WXSTRINGCAST path); } // Add paths e.g. from the PATH environment variable