diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-02-09 19:37:29 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-02-09 19:37:29 +0100 |
commit | e52d5296eb4ace38afb2d657c8944cf95872d0c9 (patch) | |
tree | 1de3a6ba2ab75cc12fff20d42b5d19739b903d4f | |
parent | a9af2ce7d3a81236298742681b3e077183221fc7 (diff) | |
download | crawler-e52d5296eb4ace38afb2d657c8944cf95872d0c9.tar.gz crawler-e52d5296eb4ace38afb2d657c8944cf95872d0c9.tar.bz2 |
fixed type in StringUtils (string::size_type or size_t instead of unsigned int)
-rw-r--r-- | src/libutil/StringUtils.cpp | 6 |
1 files 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<std::string> 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; } |