Skip to content

Commit

Permalink
fix windows lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtmac committed Dec 20, 2024
1 parent 2e92fa8 commit 85cfe93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/parquet/arrow/size_stats_benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 85cfe93

Please sign in to comment.