From 66c71d8a3d5dff6759b941eed4762896a76e9642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 18 Jul 2007 09:44:36 +0000 Subject: [PATCH] use iterators instead of c_str() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tokenzr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/tokenzr.cpp b/src/common/tokenzr.cpp index 34ba2b0523..ea615aaf57 100644 --- a/src/common/tokenzr.cpp +++ b/src/common/tokenzr.cpp @@ -59,14 +59,14 @@ void wxStringTokenizer::SetString(const wxString& str, // whitespace characters and as wxTOKEN_RET_EMPTY otherwise (for // whitespace delimiters, strtok() behaviour is better because we want // to count consecutive spaces as one delimiter) - const wxChar *p; - for ( p = delims.c_str(); *p; p++ ) + wxString::const_iterator p; + for ( p = delims.begin(); p != delims.end(); ++p ) { if ( !wxIsspace(*p) ) break; } - if ( *p ) + if ( p != delims.end() ) { // not whitespace char in delims mode = wxTOKEN_RET_EMPTY;