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/FtpNegotiationCommand.cc | |
| parent | 9a38c102dc4ff4a0a7cc96ccef7cd1400f37eea5 (diff) | |
Use std::unique_ptr for HttpRequest instead of std::shared_ptr
Diffstat (limited to 'src/FtpNegotiationCommand.cc')
| -rw-r--r-- | src/FtpNegotiationCommand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc index af0f80e1..ef943859 100644 --- a/src/FtpNegotiationCommand.cc +++ b/src/FtpNegotiationCommand.cc @@ -734,7 +734,7 @@ bool FtpNegotiationCommand::sendTunnelRequest() } } } - std::shared_ptr<HttpRequest> httpRequest(new HttpRequest()); + auto httpRequest = make_unique<HttpRequest>(); httpRequest->setUserAgent(getOption()->get(PREF_USER_AGENT)); std::shared_ptr<Request> req(new Request()); // Construct fake URI in order to use HttpRequest @@ -749,7 +749,7 @@ bool FtpNegotiationCommand::sendTunnelRequest() } httpRequest->setRequest(req); httpRequest->setProxyRequest(createProxyRequest()); - http_->sendProxyRequest(httpRequest); + http_->sendProxyRequest(std::move(httpRequest)); } else { http_->sendPendingData(); } |
