diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 00:13:15 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-07-04 00:13:15 +0900 |
| commit | cb205a207ce6c2f4e01247e2270e2fe687062a23 (patch) | |
| tree | fc817dfc1c9f178995504db68fc8977fa52833d3 /src/AbstractProxyRequestCommand.cc | |
| parent | 9a38c102dc4ff4a0a7cc96ccef7cd1400f37eea5 (diff) | |
Use std::unique_ptr for HttpRequest instead of std::shared_ptr
Diffstat (limited to 'src/AbstractProxyRequestCommand.cc')
| -rw-r--r-- | src/AbstractProxyRequestCommand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractProxyRequestCommand.cc b/src/AbstractProxyRequestCommand.cc index 4e8d83ac..f515bd68 100644 --- a/src/AbstractProxyRequestCommand.cc +++ b/src/AbstractProxyRequestCommand.cc @@ -74,12 +74,12 @@ AbstractProxyRequestCommand::~AbstractProxyRequestCommand() {} bool AbstractProxyRequestCommand::executeInternal() { //socket->setBlockingMode(); if(httpConnection_->sendBufferIsEmpty()) { - std::shared_ptr<HttpRequest> httpRequest(new HttpRequest()); + auto httpRequest = make_unique<HttpRequest>(); httpRequest->setUserAgent(getOption()->get(PREF_USER_AGENT)); httpRequest->setRequest(getRequest()); httpRequest->setProxyRequest(proxyRequest_); - httpConnection_->sendProxyRequest(httpRequest); + httpConnection_->sendProxyRequest(std::move(httpRequest)); } else { httpConnection_->sendPendingData(); } |
