diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 00:07:21 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-09-13 00:07:21 +0900 |
| commit | 2807258279d8ddbef01ca1c20a87c14aa084620c (patch) | |
| tree | e0baa98d1b2051898a4dbde0820ed81e6438fec4 /src/AbstractCommand.cc | |
| parent | bee7a8317c602a37066a7b3391b5134f31e3a5ff (diff) | |
Use std::make_shared and make_unique where possible, part 1
Diffstat (limited to 'src/AbstractCommand.cc')
| -rw-r--r-- | src/AbstractCommand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index f2b88040..2df0141b 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -748,7 +748,7 @@ std::shared_ptr<Request> AbstractCommand::createProxyRequest() const std::string proxy = getProxyUri(req_->getProtocol(), getOption().get()); if (!proxy.empty()) { - proxyRequest.reset(new Request()); + proxyRequest = std::make_shared<Request>(); if (proxyRequest->setUri(proxy)) { A2_LOG_DEBUG(fmt("CUID#%" PRId64 " - Using proxy", getCuid())); } @@ -896,7 +896,7 @@ const std::shared_ptr<Option>& AbstractCommand::getOption() const void AbstractCommand::createSocket() { - socket_.reset(new SocketCore()); + socket_ = std::make_shared<SocketCore>(); } int32_t AbstractCommand::calculateMinSplitSize() const |
