summaryrefslogtreecommitdiff
path: root/src/insert_completer.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-06-07 13:36:47 +0100
committerMaxime Coste <mawww@kakoune.org>2017-06-07 13:36:47 +0100
commitb7982c6ee38246019996e96ae7f3b4527fa50c1d (patch)
tree436e31b6d14189a6004010ccfa1fc62a515c10bf /src/insert_completer.cc
parenta0d848da8d70933f39119415647552c88e3beaf4 (diff)
Use range based accumulate wrapper instead of std::accumulate
Diffstat (limited to 'src/insert_completer.cc')
-rw-r--r--src/insert_completer.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/insert_completer.cc b/src/insert_completer.cc
index d54b85e3..c2659579 100644
--- a/src/insert_completer.cc
+++ b/src/insert_completer.cc
@@ -159,9 +159,9 @@ InsertCompletion complete_word(const SelectionList& sels, const OptionManager& o
std::sort(matches.begin(), matches.end());
matches.erase(std::unique(matches.begin(), matches.end()), matches.end());
- const auto longest = std::accumulate(matches.begin(), matches.end(), 0_char,
- [](const CharCount& lhs, const RankedMatchAndBuffer& rhs)
- { return std::max(lhs, rhs.candidate().char_length()); });
+ const auto longest = accumulate(matches, 0_char,
+ [](const CharCount& lhs, const RankedMatchAndBuffer& rhs)
+ { return std::max(lhs, rhs.candidate().char_length()); });
InsertCompletion::CandidateList candidates;
candidates.reserve(matches.size());