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/FallocFileAllocationIterator.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/FallocFileAllocationIterator.cc') diff --git a/src/FallocFileAllocationIterator.cc b/src/FallocFileAllocationIterator.cc index 3e4e24d1..f337bf7a 100644 --- a/src/FallocFileAllocationIterator.cc +++ b/src/FallocFileAllocationIterator.cc @@ -38,12 +38,12 @@ namespace aria2 { FallocFileAllocationIterator::FallocFileAllocationIterator -(BinaryStream* stream, off_t offset, uint64_t totalLength): +(BinaryStream* stream, off_t offset, off_t totalLength): stream_(stream), offset_(offset), totalLength_(totalLength) {} void FallocFileAllocationIterator::allocateChunk() { - if(static_cast(offset_) < totalLength_) { + if(offset_ < totalLength_) { stream_->allocate(offset_, totalLength_-offset_); offset_ = totalLength_; } else { @@ -54,7 +54,7 @@ void FallocFileAllocationIterator::allocateChunk() bool FallocFileAllocationIterator::finished() { - return static_cast(offset_) == totalLength_; + return offset_ == totalLength_; } off_t FallocFileAllocationIterator::getCurrentLength() @@ -62,7 +62,7 @@ off_t FallocFileAllocationIterator::getCurrentLength() return offset_; } -uint64_t FallocFileAllocationIterator::getTotalLength() +off_t FallocFileAllocationIterator::getTotalLength() { return totalLength_; } -- cgit