From b431883c3c815d724c3a4843bff71b6aab8ddf6b Mon Sep 17 00:00:00 2001 From: Andre Martins Date: Wed, 5 Nov 2014 16:01:31 +0000 Subject: [PATCH] FIX Removed innocuous statement in StringUtils. --- src/util/StringUtils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/util/StringUtils.cpp b/src/util/StringUtils.cpp index d78bf78..3f045c9 100644 --- a/src/util/StringUtils.cpp +++ b/src/util/StringUtils.cpp @@ -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); } } @@ -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); } }