summaryrefslogtreecommitdiff
path: root/src/SingleFileDownloadContext.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-08 10:33:56 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-08 10:33:56 +0000
commitc64a1910615aa812102910fd71863cd42bea59b1 (patch)
treea06d83e240c4b59d4c6d544889cf4e658674aee1 /src/SingleFileDownloadContext.cc
parent518a200d57509016cfb886df01912a8f4cdadbc0 (diff)
2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Type clarification: size_t for length or size, uint64_t for file length, off_t for file offset. * src/DefaultBtProgressInfoFile.cc * src/DefaultBtContext.{h, cc} * src/DefaultBtInteractive.cc * src/DownloadCommand.{h, cc} * src/IteratableChunkChecksumValidator.{h, cc} * src/SegmentMan.{h, cc} * src/SingleFileDownloadContext.{h, cc} * src/IteratableChecksumValidator.{h, cc} * src/BtContext.h * src/IteratableValidator.h * src/DownloadContext.h * test/SingleFileDownloadContextTest.cc * test/DefaultBtContextTest.cc * test/MockBtContext.h * test/Metalink2RequestGroupTest.cc
Diffstat (limited to 'src/SingleFileDownloadContext.cc')
-rw-r--r--src/SingleFileDownloadContext.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SingleFileDownloadContext.cc b/src/SingleFileDownloadContext.cc
index 4eae5b63..2bfa6ae6 100644
--- a/src/SingleFileDownloadContext.cc
+++ b/src/SingleFileDownloadContext.cc
@@ -37,8 +37,8 @@
namespace aria2 {
-SingleFileDownloadContext::SingleFileDownloadContext(int32_t pieceLength,
- int64_t totalLength,
+SingleFileDownloadContext::SingleFileDownloadContext(size_t pieceLength,
+ uint64_t totalLength,
const std::string& filename,
const std::string& ufilename):
_pieceLength(pieceLength),
@@ -66,7 +66,7 @@ SingleFileDownloadContext::getPieceHashes() const
return _pieceHashes;
}
-int64_t SingleFileDownloadContext::getTotalLength() const
+uint64_t SingleFileDownloadContext::getTotalLength() const
{
return _fileEntry->getLength();
}
@@ -79,7 +79,7 @@ SingleFileDownloadContext::getFileEntries() const
return fs;
}
-int32_t SingleFileDownloadContext::getNumPieces() const
+size_t SingleFileDownloadContext::getNumPieces() const
{
return (_fileEntry->getLength()+_pieceLength-1)/_pieceLength;
}
@@ -89,7 +89,7 @@ std::string SingleFileDownloadContext::getActualBasePath() const
return _dir+"/"+_fileEntry->getPath();
}
-void SingleFileDownloadContext::setTotalLength(int64_t totalLength)
+void SingleFileDownloadContext::setTotalLength(uint64_t totalLength)
{
_fileEntry->setLength(totalLength);
}