diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-07 13:36:47 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-07 13:36:47 +0100 |
| commit | b7982c6ee38246019996e96ae7f3b4527fa50c1d (patch) | |
| tree | 436e31b6d14189a6004010ccfa1fc62a515c10bf /src/shared_string.cc | |
| parent | a0d848da8d70933f39119415647552c88e3beaf4 (diff) | |
Use range based accumulate wrapper instead of std::accumulate
Diffstat (limited to 'src/shared_string.cc')
| -rw-r--r-- | src/shared_string.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared_string.cc b/src/shared_string.cc index eb12ca27..74c6c106 100644 --- a/src/shared_string.cc +++ b/src/shared_string.cc @@ -6,9 +6,9 @@ namespace Kakoune StringDataPtr StringData::create(ArrayView<const StringView> strs) { - const int len = std::accumulate(strs.begin(), strs.end(), 0, - [](int l, StringView s) - { return l + (int)s.length(); }); + const int len = accumulate(strs, 0, [](int l, StringView s) { + return l + (int)s.length(); + }); void* ptr = StringData::operator new(sizeof(StringData) + len + 1); auto* res = new (ptr) StringData(len); auto* data = reinterpret_cast<char*>(res + 1); |
