From 7d1a63de4894de55f152bb806c85d42b745b9661 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Mon, 28 May 2012 12:33:16 -0400 Subject: Fix FilePiece and progress --- klm/util/file_piece.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klm/util') diff --git a/klm/util/file_piece.cc b/klm/util/file_piece.cc index 081e662b..a205995a 100644 --- a/klm/util/file_piece.cc +++ b/klm/util/file_piece.cc @@ -36,13 +36,13 @@ const bool kSpaces[256] = {0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0 FilePiece::FilePiece(const char *name, std::ostream *show_progress, std::size_t min_buffer) : file_(OpenReadOrThrow(name)), total_size_(SizeFile(file_.get())), page_(SizePage()), - progress_(total_size_ == kBadSize ? NULL : show_progress, std::string("Reading ") + name, total_size_) { + progress_(total_size_, total_size_ == kBadSize ? NULL : show_progress, std::string("Reading ") + name) { Initialize(name, show_progress, min_buffer); } FilePiece::FilePiece(int fd, const char *name, std::ostream *show_progress, std::size_t min_buffer) : file_(fd), total_size_(SizeFile(file_.get())), page_(SizePage()), - progress_(total_size_ == kBadSize ? NULL : show_progress, std::string("Reading ") + name, total_size_) { + progress_(total_size_, total_size_ == kBadSize ? NULL : show_progress, std::string("Reading ") + name) { Initialize(name, show_progress, min_buffer); } -- cgit v1.2.3