diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 18:37:57 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 18:37:57 +0900 |
| commit | 9b84727324168f4d781ab5c69f627603a219eb92 (patch) | |
| tree | d9f57c1b32c72266f82b9a9e69c1a9087a03333b /src/RequestGroup.cc | |
| parent | 596e5c616218c9681adf4eb45077608510e2876e (diff) | |
Use std::make_shared and make_unique where possible, part 2
Diffstat (limited to 'src/RequestGroup.cc')
| -rw-r--r-- | src/RequestGroup.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index 8a111ddf..e06decdc 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -124,7 +124,7 @@ RequestGroup::RequestGroup(const std::shared_ptr<GroupId>& gid, : belongsToGID_(0), gid_(gid), option_(option), - progressInfoFile_(new NullProgressInfoFile()), + progressInfoFile_(std::make_shared<NullProgressInfoFile>()), uriSelector_(make_unique<InorderURISelector>()), requestGroupMan_(nullptr), #ifdef ENABLE_BITTORRENT @@ -1123,7 +1123,7 @@ std::shared_ptr<DownloadResult> RequestGroup::createDownloadResult() const A2_LOG_DEBUG(fmt("GID#%s - Creating DownloadResult.", gid_->toHex().c_str())); TransferStat st = calculateStat(); - std::shared_ptr<DownloadResult> res(new DownloadResult()); + auto res = std::make_shared<DownloadResult>(); res->gid = gid_; res->fileEntries = downloadContext_->getFileEntries(); res->inMemoryDownload = inMemoryDownload_; |
