From e52d5296eb4ace38afb2d657c8944cf95872d0c9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Mon, 9 Feb 2015 19:37:29 +0100 Subject: fixed type in StringUtils (string::size_type or size_t instead of unsigned int) --- src/libutil/StringUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libutil/StringUtils.cpp b/src/libutil/StringUtils.cpp index 640ce20..eb5a8dd 100644 --- a/src/libutil/StringUtils.cpp +++ b/src/libutil/StringUtils.cpp @@ -48,12 +48,12 @@ std::vector split( const string &s, const string &delimiter, bool k bool endswith( const string &s, const string &endstring ) { - unsigned int pos = s.rfind( endstring ); - return pos != string::npos && pos + endstring.length( ) == s.length( ); + string::size_type pos = s.rfind( endstring ); + return ( pos != string::npos ) && ( pos + endstring.length( ) == s.length( ) ); } bool startswith( const string &s, const string &startstring ) { - unsigned int pos = s.find( startstring ); + string::size_type pos = s.find( startstring ); return pos != string::npos; } -- cgit v1.2.3-54-g00ecf