summaryrefslogtreecommitdiff
path: root/src/HttpServer.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-09-13 18:37:57 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-09-13 18:37:57 +0900
commit9b84727324168f4d781ab5c69f627603a219eb92 (patch)
treed9f57c1b32c72266f82b9a9e69c1a9087a03333b /src/HttpServer.cc
parent596e5c616218c9681adf4eb45077608510e2876e (diff)
Use std::make_shared and make_unique where possible, part 2
Diffstat (limited to 'src/HttpServer.cc')
-rw-r--r--src/HttpServer.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index ade21620..cac0cc7f 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -62,7 +62,7 @@ std::unique_ptr<util::security::HMAC> HttpServer::hmac_;
HttpServer::HttpServer(const std::shared_ptr<SocketCore>& socket)
: socket_(socket),
- socketRecvBuffer_(new SocketRecvBuffer(socket_)),
+ socketRecvBuffer_(std::make_shared<SocketRecvBuffer>(socket_)),
socketBuffer_(socket),
headerProcessor_(make_unique<HttpHeaderProcessor>
(HttpHeaderProcessor::SERVER_PARSER)),
@@ -341,7 +341,7 @@ int HttpServer::setupResponseRecv()
if(path == "/jsonrpc") {
if(reqType_ != RPC_TYPE_JSON) {
reqType_ = RPC_TYPE_JSON;
- lastBody_.reset(new json::JsonDiskWriter());
+ lastBody_ = make_unique<json::JsonDiskWriter>();
}
return 0;
}
@@ -349,7 +349,7 @@ int HttpServer::setupResponseRecv()
if(path == "/rpc") {
if(reqType_ != RPC_TYPE_XML) {
reqType_ = RPC_TYPE_XML;
- lastBody_.reset(new rpc::XmlRpcDiskWriter());
+ lastBody_ = make_unique<rpc::XmlRpcDiskWriter>();
}
return 0;
}