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
// we take MAX_LINES_SCAN in the beginning, middle and the end of buffer
#define MAX_LINES_SCAN (10)
- size_t nCount = m_aLines.Count() / 3,
+ size_t nCount = m_aLines.GetCount() / 3,
nScan = nCount > 3*MAX_LINES_SCAN ? MAX_LINES_SCAN : nCount / 3;
#define AnalyseLine(n) \
case wxTextFileType_Unix: nUnix++; break; \
case wxTextFileType_Dos: nDos++; break; \
case wxTextFileType_Mac: nMac++; break; \
- default: wxFAIL_MSG(_("unknown line terminator")); \
+ default: wxFAIL_MSG(_T("unknown line terminator")); \
}
size_t n;