diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-11 09:36:39 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-11 09:36:39 +0000 |
| commit | 825cfe7715fee70e08a76f87cf2803602d3c5fed (patch) | |
| tree | 277cec531172e410d6fc56da37a567b1f28108c2 /src/BtCheckIntegrityEntry.cc | |
| parent | 6d78a7656d1f726fafeede2536584c40e4379cb5 (diff) | |
2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Pass std::deque<Command*> by reference to avoid unnecessary coping.
* src/AbstractCommand.cc
* src/BtCheckIntegrityEntry.cc
* src/BtCheckIntegrityEntry.h
* src/BtFileAllocationEntry.cc
* src/BtFileAllocationEntry.h
* src/BtSetup.cc
* src/BtSetup.h
* src/CheckIntegrityCommand.cc
* src/CheckIntegrityEntry.h
* src/ChecksumCheckIntegrityEntry.cc
* src/ChecksumCheckIntegrityEntry.h
* src/DHTSetup.cc
* src/DHTSetup.h
* src/DownloadEngine.cc
* src/FileAllocationCommand.cc
* src/FileAllocationEntry.h
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/StreamCheckIntegrityEntry.cc
* src/StreamCheckIntegrityEntry.h
* src/StreamFileAllocationEntry.cc
* src/StreamFileAllocationEntry.h
* src/TrackerWatcherCommand.cc
* src/a2functional.h
Diffstat (limited to 'src/BtCheckIntegrityEntry.cc')
| -rw-r--r-- | src/BtCheckIntegrityEntry.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/BtCheckIntegrityEntry.cc b/src/BtCheckIntegrityEntry.cc index 6de47243..aa14b223 100644 --- a/src/BtCheckIntegrityEntry.cc +++ b/src/BtCheckIntegrityEntry.cc @@ -47,26 +47,26 @@ BtCheckIntegrityEntry::BtCheckIntegrityEntry(RequestGroup* requestGroup): BtCheckIntegrityEntry::~BtCheckIntegrityEntry() {} -Commands BtCheckIntegrityEntry::onDownloadIncomplete(DownloadEngine* e) +void BtCheckIntegrityEntry::onDownloadIncomplete(std::deque<Command*>& commands, + DownloadEngine* e) { - Commands commands; FileAllocationEntryHandle entry(new BtFileAllocationEntry(_requestGroup)); if(_requestGroup->needsFileAllocation()) { e->_fileAllocationMan->pushFileAllocationEntry(entry); } else { - commands = entry->prepareForNextAction(e); + entry->prepareForNextAction(commands, e); } - return commands; } -Commands BtCheckIntegrityEntry::onDownloadFinished(DownloadEngine* e) +void BtCheckIntegrityEntry::onDownloadFinished(std::deque<Command*>& commands, + DownloadEngine* e) { _requestGroup->getPieceStorage()->getDiskAdaptor()->onDownloadComplete(); // TODO Currently,when all the checksums // are valid, then aira2 goes to seeding mode. Sometimes it is better // to exit rather than doing seeding. So, it would be good to toggle this // behavior. - return onDownloadIncomplete(e); + onDownloadIncomplete(commands, e); } } // namespace aria2 |
