diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-07 22:57:34 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | 12988e5282ef52a2806cbaca9f4074698f35e399 (patch) | |
| tree | 7a8d5a65a8e8478ba5855e84a1077baee1a2028d /src/FallocFileAllocationIterator.cc | |
| parent | f25e67b0178511b26d55642f215a095321a169a8 (diff) | |
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.
Diffstat (limited to 'src/FallocFileAllocationIterator.cc')
| -rw-r--r-- | src/FallocFileAllocationIterator.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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<uint64_t>(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<uint64_t>(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_; } |
