summaryrefslogtreecommitdiff
path: root/src/DownloadEngineFactory.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 00:30:30 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-07-06 15:56:08 +0900
commit697c1008f715669cdd6c8e5b7610a20182375253 (patch)
treeae942c82de22caa3dc6273ff257827f80711bfc1 /src/DownloadEngineFactory.cc
parent6b397c812520016f7b2b22544f51bfddbcca8dfe (diff)
DownloadEngine: Use std::unique_ptr for checkIntegrityMan_, fileAllocationMan_
Diffstat (limited to 'src/DownloadEngineFactory.cc')
-rw-r--r--src/DownloadEngineFactory.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc
index 9d3fb85d..0227e061 100644
--- a/src/DownloadEngineFactory.cc
+++ b/src/DownloadEngineFactory.cc
@@ -153,19 +153,19 @@ DownloadEngineFactory::newDownloadEngine
(std::move(requestGroups), MAX_CONCURRENT_DOWNLOADS, op);
requestGroupMan->initWrDiskCache();
e->setRequestGroupMan(requestGroupMan);
- e->setFileAllocationMan
- (std::shared_ptr<FileAllocationMan>(new FileAllocationMan()));
+ e->setFileAllocationMan(make_unique<FileAllocationMan>());
#ifdef ENABLE_MESSAGE_DIGEST
- e->setCheckIntegrityMan
- (std::shared_ptr<CheckIntegrityMan>(new CheckIntegrityMan()));
+ e->setCheckIntegrityMan(make_unique<CheckIntegrityMan>());
#endif // ENABLE_MESSAGE_DIGEST
e->addRoutineCommand(make_unique<FillRequestGroupCommand>
(e->newCUID(), e.get()));
e->addRoutineCommand(make_unique<FileAllocationDispatcherCommand>
- (e->newCUID(), e->getFileAllocationMan(), e.get()));
+ (e->newCUID(), e->getFileAllocationMan().get(),
+ e.get()));
#ifdef ENABLE_MESSAGE_DIGEST
e->addRoutineCommand(make_unique<CheckIntegrityDispatcherCommand>
- (e->newCUID(), e->getCheckIntegrityMan(), e.get()));
+ (e->newCUID(), e->getCheckIntegrityMan().get(),
+ e.get()));
#endif // ENABLE_MESSAGE_DIGEST
if(op->getAsInt(PREF_AUTO_SAVE_INTERVAL) > 0) {