From 12988e5282ef52a2806cbaca9f4074698f35e399 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 7 Dec 2011 22:57:34 +0900 Subject: Replaced uint64_t with off_t or int64_t. Since off_t is int64_t with LFS, we cannot take advantage of extra capacity of uint64_t. --- src/SingleFileAllocationIterator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SingleFileAllocationIterator.cc') diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc index fb72da8a..5a1d5598 100644 --- a/src/SingleFileAllocationIterator.cc +++ b/src/SingleFileAllocationIterator.cc @@ -51,7 +51,7 @@ namespace aria2 { SingleFileAllocationIterator::SingleFileAllocationIterator (BinaryStream* stream, off_t offset, - uint64_t totalLength) + off_t totalLength) : stream_(stream), offset_(offset), totalLength_(totalLength), @@ -90,7 +90,7 @@ void SingleFileAllocationIterator::allocateChunk() stream_->writeData(buffer_, BUFSIZE, offset_); offset_ += BUFSIZE; - if(totalLength_ < (uint64_t)offset_) { + if(totalLength_ < offset_) { stream_->truncate(totalLength_); offset_ = totalLength_; } @@ -98,7 +98,7 @@ void SingleFileAllocationIterator::allocateChunk() bool SingleFileAllocationIterator::finished() { - return (uint64_t)offset_ == totalLength_; + return offset_ == totalLength_; } } // namespace aria2 -- cgit