diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:12:52 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:20:27 +0900 |
| commit | d64089632e82a2548752c7a6baaa68365a795a74 (patch) | |
| tree | 57fc7b85a8c1290975d58fa4761b04a7695bf7e3 /src/ChecksumCheckIntegrityEntry.cc | |
| parent | c81b1321122e8509b55c94c0cbca0d8d6d319f0c (diff) | |
| parent | a7cd943a06b1a5ff4515b57060b84037f8d01f9f (diff) | |
Merge branch 'master' into random-webseeding
Diffstat (limited to 'src/ChecksumCheckIntegrityEntry.cc')
| -rw-r--r-- | src/ChecksumCheckIntegrityEntry.cc | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/ChecksumCheckIntegrityEntry.cc b/src/ChecksumCheckIntegrityEntry.cc index f1c47e07..9e138155 100644 --- a/src/ChecksumCheckIntegrityEntry.cc +++ b/src/ChecksumCheckIntegrityEntry.cc @@ -44,43 +44,42 @@ namespace aria2 { -ChecksumCheckIntegrityEntry::ChecksumCheckIntegrityEntry -(RequestGroup* requestGroup, std::unique_ptr<Command> nextCommand) - : CheckIntegrityEntry{requestGroup, std::move(nextCommand)}, - redownload_{false} -{} +ChecksumCheckIntegrityEntry::ChecksumCheckIntegrityEntry( + RequestGroup* requestGroup, std::unique_ptr<Command> nextCommand) + : CheckIntegrityEntry{requestGroup, std::move(nextCommand)}, + redownload_{false} +{ +} ChecksumCheckIntegrityEntry::~ChecksumCheckIntegrityEntry() {} bool ChecksumCheckIntegrityEntry::isValidationReady() { const std::shared_ptr<DownloadContext>& dctx = - getRequestGroup()->getDownloadContext(); + getRequestGroup()->getDownloadContext(); return dctx->isChecksumVerificationAvailable(); } void ChecksumCheckIntegrityEntry::initValidator() { - auto validator = make_unique<IteratableChecksumValidator> - (getRequestGroup()->getDownloadContext(), - getRequestGroup()->getPieceStorage()); + auto validator = make_unique<IteratableChecksumValidator>( + getRequestGroup()->getDownloadContext(), + getRequestGroup()->getPieceStorage()); validator->init(); setValidator(std::move(validator)); } -void -ChecksumCheckIntegrityEntry::onDownloadFinished -(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) -{} +void ChecksumCheckIntegrityEntry::onDownloadFinished( + std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) +{ +} -void -ChecksumCheckIntegrityEntry::onDownloadIncomplete -(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) +void ChecksumCheckIntegrityEntry::onDownloadIncomplete( + std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e) { - if(redownload_) { - proceedFileAllocation(commands, - make_unique<StreamFileAllocationEntry> - (getRequestGroup(), popNextCommand()), + if (redownload_) { + proceedFileAllocation(commands, make_unique<StreamFileAllocationEntry>( + getRequestGroup(), popNextCommand()), e); return; } |
