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/PeerSessionResource.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/PeerSessionResource.cc')
| -rw-r--r-- | src/PeerSessionResource.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PeerSessionResource.cc b/src/PeerSessionResource.cc index 790f1148..912f665d 100644 --- a/src/PeerSessionResource.cc +++ b/src/PeerSessionResource.cc @@ -44,7 +44,7 @@ namespace aria2 { -PeerSessionResource::PeerSessionResource(size_t pieceLength, uint64_t totalLength): +PeerSessionResource::PeerSessionResource(size_t pieceLength, off_t totalLength): amChoking_(true), amInterested_(false), peerChoking_(true), @@ -237,7 +237,7 @@ void PeerSessionResource::dhtEnabled(bool b) dhtEnabled_ = b; } -uint64_t PeerSessionResource::uploadLength() const +off_t PeerSessionResource::uploadLength() const { return peerStat_.getSessionUploadLength(); } @@ -247,7 +247,7 @@ void PeerSessionResource::updateUploadLength(size_t bytes) peerStat_.updateUploadLength(bytes); } -uint64_t PeerSessionResource::downloadLength() const +off_t PeerSessionResource::downloadLength() const { return peerStat_.getSessionDownloadLength(); } @@ -259,7 +259,7 @@ void PeerSessionResource::updateDownloadLength(size_t bytes) lastDownloadUpdate_ = global::wallclock(); } -uint64_t PeerSessionResource::getCompletedLength() const +off_t PeerSessionResource::getCompletedLength() const { return bitfieldMan_->getCompletedLength(); } @@ -275,7 +275,7 @@ size_t PeerSessionResource::countOutstandingUpload() const return dispatcher_->countOutstandingUpload(); } -void PeerSessionResource::reconfigure(size_t pieceLength, uint64_t totalLenth) +void PeerSessionResource::reconfigure(size_t pieceLength, off_t totalLenth) { delete bitfieldMan_; bitfieldMan_ = new BitfieldMan(pieceLength, totalLenth); |
