From 3ed358cbfe68ea75eebda11bcb867c01b6469213 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 4 Aug 1998 16:05:22 +0000 Subject: [PATCH] size_t -> int conversion and the warnings about it corrected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/include/wx/string.h b/include/wx/string.h index efe6e9fbe4..3c7a1cdf09 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -533,17 +533,13 @@ public: wxString& Remove(size_t pos) { return Truncate(pos); } wxString& RemoveLast() { return Truncate(Len() - 1); } - // Robert Roebling - wxString& Remove(size_t nStart, size_t nLen) - { return erase( nStart, nLen ); } + wxString& Remove(size_t nStart, size_t nLen) { return erase( nStart, nLen ); } - int First( const char ch ) const { size_t res = find(ch); return res == wxString::npos ? -1 : res; } - int First( const char* psz ) const { size_t res = find(psz); return res == wxString::npos ? -1 : res; } - int First( const wxString &str ) const { size_t res = find(str); return res == wxString::npos ? -1 : res; } + int First( const char ch ) const { return Find(ch); } + int First( const char* psz ) const { return Find(psz); } + int First( const wxString &str ) const { return Find(str); } - int Last( const char ch ) const { size_t res = rfind(ch,0); return res == wxString::npos ? -1 : res; } - int Last( const char* psz ) const { size_t res = rfind(psz,0); return res == wxString::npos ? -1 : res; } - int Last( const wxString &str ) const { size_t res = rfind(str,0); return res == wxString::npos ? -1 : res; } + int Last( const char ch ) const { return Find(ch, TRUE); } /// same as IsEmpty bool IsNull() const { return IsEmpty(); }