diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 21:55:52 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-23 21:55:52 +0900 |
| commit | fa9f3fb5a3c8912a0a6880ffba9c72f4424ea044 (patch) | |
| tree | deb0b47b085a3a689bf386409734bfd3f72f57d2 /src/RequestGroup.h | |
| parent | bb5b7eeedb3ce7396007818cbab4f5f5660997a5 (diff) | |
Wrap Command object in std::unique_ptr
Diffstat (limited to 'src/RequestGroup.h')
| -rw-r--r-- | src/RequestGroup.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/RequestGroup.h b/src/RequestGroup.h index 3fe0ce33..6ba18145 100644 --- a/src/RequestGroup.h +++ b/src/RequestGroup.h @@ -215,16 +215,18 @@ public: // Returns first bootstrap commands to initiate a download. // If this is HTTP/FTP download and file size is unknown, only 1 command // (usually, HttpInitiateConnection or FtpInitiateConnection) will be created. - void createInitialCommand(std::vector<Command*>& commands, + void createInitialCommand(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e); - void createNextCommandWithAdj(std::vector<Command*>& commands, - DownloadEngine* e, int numAdj); + void createNextCommandWithAdj + (std::vector<std::unique_ptr<Command>>& commands, + DownloadEngine* e, int numAdj); - void createNextCommand(std::vector<Command*>& commands, + void createNextCommand(std::vector<std::unique_ptr<Command>>& commands, DownloadEngine* e, int numCommand); - void createNextCommand(std::vector<Command*>& commands, DownloadEngine* e); + void createNextCommand(std::vector<std::unique_ptr<Command>>& commands, + DownloadEngine* e); bool downloadFinished() const; @@ -383,9 +385,10 @@ public: void clearPreDownloadHandler(); - void processCheckIntegrityEntry(std::vector<Command*>& commands, - const std::shared_ptr<CheckIntegrityEntry>& entry, - DownloadEngine* e); + void processCheckIntegrityEntry + (std::vector<std::unique_ptr<Command>>& commands, + const std::shared_ptr<CheckIntegrityEntry>& entry, + DownloadEngine* e); // Initializes pieceStorage_ and segmentMan_. We guarantee that // either both of pieceStorage_ and segmentMan_ are initialized or |
