aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/wcstringutil.cpp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-04 15:19:47 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-04 15:32:04 -0700
commit79f342b954a6f47ee3f1277a899066a654e7c330 (patch)
treea9386ce1e108a5c046276e4266e0129404fc4ea0 /src/wcstringutil.cpp
parent527e5f52ba5a097a24490065fea23b4627032e4c (diff)
lint cleanup: eliminate "redundant" errors
This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
Diffstat (limited to 'src/wcstringutil.cpp')
-rw-r--r--src/wcstringutil.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}