summaryrefslogtreecommitdiff
path: root/src/Peer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-07 22:57:34 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-09 21:39:43 +0900
commit12988e5282ef52a2806cbaca9f4074698f35e399 (patch)
tree7a8d5a65a8e8478ba5855e84a1077baee1a2028d /src/Peer.cc
parentf25e67b0178511b26d55642f215a095321a169a8 (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/Peer.cc')
-rw-r--r--src/Peer.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Peer.cc b/src/Peer.cc
index fc690cc9..07d2f22a 100644
--- a/src/Peer.cc
+++ b/src/Peer.cc
@@ -73,7 +73,7 @@ void Peer::usedBy(cuid_t cuid)
cuid_ = cuid;
}
-void Peer::allocateSessionResource(size_t pieceLength, uint64_t totalLength)
+void Peer::allocateSessionResource(size_t pieceLength, off_t totalLength)
{
delete res_;
res_ = new PeerSessionResource(pieceLength, totalLength);
@@ -81,7 +81,7 @@ void Peer::allocateSessionResource(size_t pieceLength, uint64_t totalLength)
updateSeeder();
}
-void Peer::reconfigureSessionResource(size_t pieceLength, uint64_t totalLength)
+void Peer::reconfigureSessionResource(size_t pieceLength, off_t totalLength)
{
assert(res_);
res_->reconfigure(pieceLength, totalLength);
@@ -228,13 +228,13 @@ unsigned int Peer::calculateDownloadSpeed()
return res_->getPeerStat().calculateDownloadSpeed();
}
-uint64_t Peer::getSessionUploadLength() const
+off_t Peer::getSessionUploadLength() const
{
assert(res_);
return res_->uploadLength();
}
-uint64_t Peer::getSessionDownloadLength() const
+off_t Peer::getSessionDownloadLength() const
{
assert(res_);
return res_->downloadLength();
@@ -388,7 +388,7 @@ const Timer& Peer::getLastAmUnchoking() const
return res_->getLastAmUnchoking();
}
-uint64_t Peer::getCompletedLength() const
+off_t Peer::getCompletedLength() const
{
assert(res_);
return res_->getCompletedLength();