use iterators instead of c_str()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,14 +59,14 @@ void wxStringTokenizer::SetString(const wxString& str,
|
|||||||
// whitespace characters and as wxTOKEN_RET_EMPTY otherwise (for
|
// whitespace characters and as wxTOKEN_RET_EMPTY otherwise (for
|
||||||
// whitespace delimiters, strtok() behaviour is better because we want
|
// whitespace delimiters, strtok() behaviour is better because we want
|
||||||
// to count consecutive spaces as one delimiter)
|
// to count consecutive spaces as one delimiter)
|
||||||
const wxChar *p;
|
wxString::const_iterator p;
|
||||||
for ( p = delims.c_str(); *p; p++ )
|
for ( p = delims.begin(); p != delims.end(); ++p )
|
||||||
{
|
{
|
||||||
if ( !wxIsspace(*p) )
|
if ( !wxIsspace(*p) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( *p )
|
if ( p != delims.end() )
|
||||||
{
|
{
|
||||||
// not whitespace char in delims
|
// not whitespace char in delims
|
||||||
mode = wxTOKEN_RET_EMPTY;
|
mode = wxTOKEN_RET_EMPTY;
|
||||||
|
|||||||
Reference in New Issue
Block a user