diff options
Diffstat (limited to 'src/stringhelper.cpp')
-rw-r--r-- | src/stringhelper.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/stringhelper.cpp b/src/stringhelper.cpp index 2b25d3f..2b4f783 100644 --- a/src/stringhelper.cpp +++ b/src/stringhelper.cpp @@ -58,18 +58,18 @@ string stripWhiteSpace( const string& s ) return s; } - int pos = 0; + size_t pos = 0; string line = s; - string::size_type len = line.length(); + size_t len = line.length(); while ( pos < len && isspace( line[pos] ) ) { ++pos; } line.erase( 0, pos ); pos = line.length()-1; - while ( pos > -1 && isspace( line[pos] ) ) { + while ( pos != (size_t) -1 && isspace( line[pos] ) ) { --pos; } - if ( pos != -1 ) { + if ( pos != (size_t) -1 ) { line.erase( pos+1 ); } return line; |