From 367879ddcf7f332a04cc844ad683caf1c94c933c Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 10 Sep 2021 14:16:51 +0300 Subject: [PATCH] src: Use pre-increment iterator syntax Cppcheck produces the following warning: ``` string_utils.cc:24:9: performance: Prefer prefix ++/-- operators for non-primitive types. ``` Fixes #4340 --- src/string_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string_utils.cc b/src/string_utils.cc index 212cab2e..459bea0b 100644 --- a/src/string_utils.cc +++ b/src/string_utils.cc @@ -21,7 +21,7 @@ String trim_indent(StringView str) utf8::iterator it{str.begin(), str}; while (it != str.end() and is_horizontal_blank(*it)) - it++; + ++it; const StringView indent{str.begin(), it.base()}; return accumulate(str | split_after('\n') | transform([&](auto&& line) {