diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-08 00:03:25 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | 9d15d732edd512a3ff03147da459feaddde511fe (patch) | |
| tree | 4206d8328e73cdf57e88830fb6b5f64c18f39f73 /src/PeerSessionResource.cc | |
| parent | 12988e5282ef52a2806cbaca9f4074698f35e399 (diff) | |
Use int32_t for piece length instead of size_t
Diffstat (limited to 'src/PeerSessionResource.cc')
| -rw-r--r-- | src/PeerSessionResource.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/PeerSessionResource.cc b/src/PeerSessionResource.cc index 912f665d..bbb3680d 100644 --- a/src/PeerSessionResource.cc +++ b/src/PeerSessionResource.cc @@ -44,7 +44,8 @@ namespace aria2 { -PeerSessionResource::PeerSessionResource(size_t pieceLength, off_t totalLength): +PeerSessionResource::PeerSessionResource(int32_t pieceLength, off_t totalLength) + : amChoking_(true), amInterested_(false), peerChoking_(true), @@ -130,7 +131,8 @@ void PeerSessionResource::updateBitfield(size_t index, int operation) } } -void PeerSessionResource::setBitfield(const unsigned char* bitfield, size_t bitfieldLength) +void PeerSessionResource::setBitfield +(const unsigned char* bitfield, size_t bitfieldLength) { bitfieldMan_->setBitfield(bitfield, bitfieldLength); } @@ -242,7 +244,7 @@ off_t PeerSessionResource::uploadLength() const return peerStat_.getSessionUploadLength(); } -void PeerSessionResource::updateUploadLength(size_t bytes) +void PeerSessionResource::updateUploadLength(int32_t bytes) { peerStat_.updateUploadLength(bytes); } @@ -252,7 +254,7 @@ off_t PeerSessionResource::downloadLength() const return peerStat_.getSessionDownloadLength(); } -void PeerSessionResource::updateDownloadLength(size_t bytes) +void PeerSessionResource::updateDownloadLength(int32_t bytes) { peerStat_.updateDownloadLength(bytes); @@ -275,7 +277,7 @@ size_t PeerSessionResource::countOutstandingUpload() const return dispatcher_->countOutstandingUpload(); } -void PeerSessionResource::reconfigure(size_t pieceLength, off_t totalLenth) +void PeerSessionResource::reconfigure(int32_t pieceLength, off_t totalLenth) { delete bitfieldMan_; bitfieldMan_ = new BitfieldMan(pieceLength, totalLenth); |
