From 85cfe93ca16b066fea4b8ff4432f06479c5295a0 Mon Sep 17 00:00:00 2001 From: Gang Wu Date: Fri, 20 Dec 2024 16:40:07 +0800 Subject: [PATCH] fix windows lint --- cpp/src/parquet/arrow/size_stats_benchmark.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/parquet/arrow/size_stats_benchmark.cc b/cpp/src/parquet/arrow/size_stats_benchmark.cc index dc1ff969d990b..4a1c092adf376 100644 --- a/cpp/src/parquet/arrow/size_stats_benchmark.cc +++ b/cpp/src/parquet/arrow/size_stats_benchmark.cc @@ -45,12 +45,12 @@ int64_t GetTotalBytes(const std::shared_ptr<::arrow::ArrayData>& data) { return 0; } int64_t total_bytes = - std::accumulate(data->buffers.cbegin(), data->buffers.cend(), 0L, + std::accumulate(data->buffers.cbegin(), data->buffers.cend(), int64_t{0}, [](int64_t acc, const auto& buffer) { - return acc + (buffer != nullptr ? buffer->size() : 0L); + return acc + (buffer != nullptr ? buffer->size() : int64_t{0}); }); total_bytes += std::accumulate( - data->child_data.cbegin(), data->child_data.cend(), 0L, + data->child_data.cbegin(), data->child_data.cend(), int64_t{0}, [](int64_t acc, const auto& child) { return acc + GetTotalBytes(child); }); total_bytes += GetTotalBytes(data->dictionary); return total_bytes;