summaryrefslogtreecommitdiff
path: root/src/StreamCheckIntegrityEntry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 00:17:44 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 15:56:08 +0900
commit6b397c812520016f7b2b22544f51bfddbcca8dfe (patch)
tree6dcf656fb19da47833324111efcee62c66809365 /src/StreamCheckIntegrityEntry.cc
parentc9e58779e1a30b32ea2f86e686211d901aca19f0 (diff)
Use std::unique_ptr for CheckIntegrityEntry and FileAllocationEntry
Diffstat (limited to 'src/StreamCheckIntegrityEntry.cc')
-rw-r--r--src/StreamCheckIntegrityEntry.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/StreamCheckIntegrityEntry.cc b/src/StreamCheckIntegrityEntry.cc
index e245f18e..aa345806 100644
--- a/src/StreamCheckIntegrityEntry.cc
+++ b/src/StreamCheckIntegrityEntry.cc
@@ -52,14 +52,15 @@ StreamCheckIntegrityEntry::~StreamCheckIntegrityEntry() {}
void StreamCheckIntegrityEntry::onDownloadIncomplete
(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e)
{
- const std::shared_ptr<PieceStorage>& ps = getRequestGroup()->getPieceStorage();
+ auto& ps = getRequestGroup()->getPieceStorage();
ps->onDownloadIncomplete();
if(getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY)) {
return;
}
- std::shared_ptr<FileAllocationEntry> entry
- (new StreamFileAllocationEntry(getRequestGroup(), popNextCommand()));
- proceedFileAllocation(commands, entry, e);
+ proceedFileAllocation(commands,
+ make_unique<StreamFileAllocationEntry>
+ (getRequestGroup(), popNextCommand()),
+ e);
}
void StreamCheckIntegrityEntry::onDownloadFinished