diff options
| author | Frank LENORMAND <lenormf@gmail.com> | 2021-09-10 14:16:51 +0300 |
|---|---|---|
| committer | Frank LENORMAND <lenormf@gmail.com> | 2021-10-23 10:34:27 +0200 |
| commit | 367879ddcf7f332a04cc844ad683caf1c94c933c (patch) | |
| tree | 3d75fd1c1a2150a92246be7a05b787a10c1ae78d /src/string_utils.cc | |
| parent | aff303190de8985f17e516e81e0a13c4cb353d4a (diff) | |
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
Diffstat (limited to 'src/string_utils.cc')
| -rw-r--r-- | src/string_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<StringView>('\n') | transform([&](auto&& line) { |
