Skip to content

Commit

Permalink
FIX Removed innocuous statement in StringUtils.
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-martins committed Nov 5, 2014
1 parent 01b5c7a commit b431883
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/util/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ void TrimComments(const string &delim, string *line) {
// non-delimiting character (e.g. whitespaces).
void TrimLeft(const string &delim, string *line) {
size_t cutAt = line->find_first_not_of(delim);
if (cutAt == line->npos) {
*line == "";
} else {
if (cutAt != line->npos) {
*line = line->substr(cutAt);
}
}
Expand All @@ -68,9 +66,7 @@ void TrimLeft(const string &delim, string *line) {
// non-delimiting character (e.g. whitespaces).
void TrimRight(const string &delim, string *line) {
size_t cutAt = line->find_last_not_of(delim);
if (cutAt == line->npos) {
*line == "";
} else {
if (cutAt != line->npos) {
*line = line->substr(0, cutAt+1);
}
}
Expand Down

0 comments on commit b431883

Please sign in to comment.