X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe4a282956f13754527f5f7ea090fa8841f07771..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/textbuf.cpp?ds=inline diff --git a/src/common/textbuf.cpp b/src/common/textbuf.cpp index 17e00fac41..b6e8362c85 100644 --- a/src/common/textbuf.cpp +++ b/src/common/textbuf.cpp @@ -80,14 +80,14 @@ wxString wxTextBuffer::Translate(const wxString& text, wxTextFileType type) wxString eol = GetEOL(type), result; // optimization: we know that the length of the new string will be about - // the same as the length of the old one, so prealloc memory to aviod + // the same as the length of the old one, so prealloc memory to avoid // unnecessary relocations result.Alloc(text.Len()); wxChar chLast = 0; - for ( const wxChar *pc = text.c_str(); *pc; pc++ ) + for ( wxString::const_iterator i = text.begin(); i != text.end(); ++i ) { - wxChar ch = *pc; + wxChar ch = *i; switch ( ch ) { case _T('\n'): // Dos/Unix line termination