X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/85833f5c6c5c136d16ccd01c90cc243d5d025e0a..d01cc696fca6de1e1fa3ebcd10eefc6596d629f9:/src/common/tokenzr.cpp diff --git a/src/common/tokenzr.cpp b/src/common/tokenzr.cpp index 0307ac3a54..6b5d18e178 100644 --- a/src/common/tokenzr.cpp +++ b/src/common/tokenzr.cpp @@ -35,13 +35,13 @@ wxStringTokenizer::~wxStringTokenizer() { } -off_t wxStringTokenizer::FindDelims(const wxString& str, const wxString& delims) +off_t wxStringTokenizer::FindDelims(const wxString& str, const wxString& delims) const { - for ( int i = 0; i < str.Length(); i++ ) + for ( size_t i = 0; i < str.Length(); i++ ) { - char c = str[i]; + wxChar c = str[i]; - for ( int j = 0; j < delims.Length() ; j++ ) + for ( size_t j = 0; j < delims.Length() ; j++ ) { if ( delims[j] == c ) return i; @@ -55,7 +55,7 @@ int wxStringTokenizer::CountTokens() const { wxString p_string = m_string; bool found = TRUE; - int pos, count = 1; + int pos, count = 1; if (p_string.Length() == 0) return 0; @@ -66,7 +66,7 @@ int wxStringTokenizer::CountTokens() const if (pos != -1) { count++; - p_string = p_string(0, pos); + p_string = p_string(pos+1, p_string.Length()); } else { @@ -77,13 +77,13 @@ int wxStringTokenizer::CountTokens() const return count; } -bool wxStringTokenizer::HasMoreToken() +bool wxStringTokenizer::HasMoreTokens() { return !m_string.IsEmpty(); } // needed to fix leading whitespace / mult. delims bugs -void wxStringTokenizer::EatLeadingDelims() +void wxStringTokenizer::EatLeadingDelims() { int pos;