From b7982c6ee38246019996e96ae7f3b4527fa50c1d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 7 Jun 2017 13:36:47 +0100 Subject: Use range based accumulate wrapper instead of std::accumulate --- src/shared_string.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared_string.cc') 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 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(res + 1); -- cgit v1.2.3