summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 21:55:52 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-23 21:55:52 +0900
commitfa9f3fb5a3c8912a0a6880ffba9c72f4424ea044 (patch)
treedeb0b47b085a3a689bf386409734bfd3f72f57d2 /src/DownloadEngine.h
parentbb5b7eeedb3ce7396007818cbab4f5f5660997a5 (diff)
Wrap Command object in std::unique_ptr
Diffstat (limited to 'src/DownloadEngine.h')
-rw-r--r--src/DownloadEngine.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h
index 242769fe..5784b0d1 100644
--- a/src/DownloadEngine.h
+++ b/src/DownloadEngine.h
@@ -131,7 +131,7 @@ private:
int64_t refreshInterval_;
Timer lastRefresh_;
- std::deque<Command*> routineCommands_;
+ std::deque<std::unique_ptr<Command>> routineCommands_;
std::shared_ptr<CookieStorage> cookieStorage_;
@@ -167,7 +167,7 @@ private:
std::multimap<std::string, SocketPoolEntry>::iterator
findSocketPoolEntry(const std::string& key);
- std::deque<Command*> commands_;
+ std::deque<std::unique_ptr<Command>> commands_;
std::shared_ptr<RequestGroupMan> requestGroupMan_;
std::shared_ptr<FileAllocationMan> fileAllocationMan_;
std::shared_ptr<CheckIntegrityMan> checkIntegrityMan_;
@@ -200,9 +200,9 @@ public:
Command* command);
#endif // ENABLE_ASYNC_DNS
- void addCommand(const std::vector<Command*>& commands);
+ void addCommand(std::vector<std::unique_ptr<Command>> commands);
- void addCommand(Command* command);
+ void addCommand(std::unique_ptr<Command> command);
const std::shared_ptr<RequestGroupMan>& getRequestGroupMan() const
{
@@ -253,7 +253,7 @@ public:
void setNoWait(bool b);
- void addRoutineCommand(Command* command);
+ void addRoutineCommand(std::unique_ptr<Command> command);
void poolSocket(const std::string& ipaddr, uint16_t port,
const std::string& username,