From 79f342b954a6f47ee3f1277a899066a654e7c330 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 4 May 2016 15:19:47 -0700 Subject: lint cleanup: eliminate "redundant" errors This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses. --- src/wcstringutil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/wcstringutil.cpp') diff --git a/src/wcstringutil.cpp b/src/wcstringutil.cpp index 3983eb53..9fcb168e 100644 --- a/src/wcstringutil.cpp +++ b/src/wcstringutil.cpp @@ -22,8 +22,8 @@ wcstring_range wcstring_tok(wcstring& str, const wcstring& needle, wcstring_rang size_type next_pos = str.find_first_of(needle, pos); if (next_pos == wcstring::npos) { return std::make_pair(pos, wcstring::npos); - } else { - str[next_pos] = L'\0'; - return std::make_pair(pos, next_pos - pos); } + + str[next_pos] = L'\0'; + return std::make_pair(pos, next_pos - pos); } -- cgit v1.2.3