From 2027288898d08094f0c299942e12f0a086264ec7 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Thu, 20 May 1999 11:11:46 +0000 Subject: [PATCH] Unicode compilation fix for find_*_of() (I might be back at work committing other fixes soon, but probably not before tomorrow at least.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/string.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/string.cpp b/src/common/string.cpp index c866ca4589..37f8847172 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1470,7 +1470,7 @@ size_t wxString::find_last_of(const wxChar* sz, size_t nStart) const wxASSERT( nStart <= Len() ); } - for ( const char *p = c_str() + length() - 1; p >= c_str(); p-- ) + for ( const wxChar *p = c_str() + length() - 1; p >= c_str(); p-- ) { if ( wxStrchr(sz, *p) ) return p - c_str(); @@ -1490,7 +1490,7 @@ size_t wxString::find_first_not_of(const wxChar* sz, size_t nStart) const wxASSERT( nStart <= Len() ); } - size_t nAccept = strspn(c_str() + nStart, sz); + size_t nAccept = wxStrspn(c_str() + nStart, sz); if ( nAccept >= length() - nStart ) return npos; else @@ -1501,7 +1501,7 @@ size_t wxString::find_first_not_of(wxChar ch, size_t nStart) const { wxASSERT( nStart <= Len() ); - for ( const char *p = c_str() + nStart; *p; p++ ) + for ( const wxChar *p = c_str() + nStart; *p; p++ ) { if ( *p != ch ) return p - c_str(); @@ -1521,7 +1521,7 @@ size_t wxString::find_last_not_of(const wxChar* sz, size_t nStart) const wxASSERT( nStart <= Len() ); } - for ( const char *p = c_str() + nStart - 1; p >= c_str(); p-- ) + for ( const wxChar *p = c_str() + nStart - 1; p >= c_str(); p-- ) { if ( !wxStrchr(sz, *p) ) return p - c_str(); @@ -1541,7 +1541,7 @@ size_t wxString::find_last_not_of(wxChar ch, size_t nStart) const wxASSERT( nStart <= Len() ); } - for ( const char *p = c_str() + nStart - 1; p >= c_str(); p-- ) + for ( const wxChar *p = c_str() + nStart - 1; p >= c_str(); p-- ) { if ( *p != ch ) return p - c_str(); -- 2.45.2