From 7d0dc10169e367ca5bee06a9649c2a8a0763faf7 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 27 Oct 2018 18:34:35 +0200 Subject: [PATCH] :rotating_light: fixed a linter warning --- include/nlohmann/detail/output/binary_writer.hpp | 2 +- single_include/nlohmann/json.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 5c2a58f7c..8e8f5ea7f 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -988,7 +988,7 @@ class binary_writer */ static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) { - std::size_t document_size = std::accumulate(value.begin(), value.end(), 0, + std::size_t document_size = std::accumulate(value.begin(), value.end(), 0ul, [](size_t result, const typename BasicJsonType::object_t::value_type & el) { return result += calc_bson_element_size(el.first, el.second); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index d288086e8..51e97871c 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -9307,7 +9307,7 @@ class binary_writer */ static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value) { - std::size_t document_size = std::accumulate(value.begin(), value.end(), 0, + std::size_t document_size = std::accumulate(value.begin(), value.end(), 0ul, [](size_t result, const typename BasicJsonType::object_t::value_type & el) { return result += calc_bson_element_size(el.first, el.second);