Fix update_progress for files >4GiB

This commit is contained in:
Marcus Holland-Moritz 2023-08-20 09:57:03 +02:00
parent af8aafc30f
commit 323ece6589

View File

@ -1075,12 +1075,13 @@ void segmenter_<LoggerPolicy, SegmentingPolicy>::segment_and_add_data(
// TODO: how can we reasonably update the top progress bar with
// multiple concurrent segmenters?
auto update_progress = [this, last_offset = 0](size_t offset) mutable {
auto bytes = frames_to_bytes(offset - last_offset);
prog_.total_bytes_read += bytes;
pctx_->bytes_processed += bytes;
last_offset = offset;
};
auto update_progress =
[this, last_offset = static_cast<size_t>(0)](size_t offset) mutable {
auto bytes = frames_to_bytes(offset - last_offset);
prog_.total_bytes_read += bytes;
pctx_->bytes_processed += bytes;
last_offset = offset;
};
while (offset_in_frames < size_in_frames) {
++stats_.bloom_lookups;