aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-04-28 13:40:20 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-04-28 13:43:32 +0200
commit07e4edb056249e017b0e5a4783e4452ce892b52d (patch)
tree6122537963799ff7bcfaf6af24d720b7fce5e5fe /src/httpserver.cpp
parent073225cb01d9c2629c7a423dbe6afcd07601ffb7 (diff)
auto_ptr → unique_ptr
Change the few occurrences of the deprecated `auto_ptr` to c++11 `unique_ptr`. Silences the deprecation warnings. Also add a missing `std::` for consistency.
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index ce1accb046..a98eff7c16 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -252,7 +252,7 @@ static std::string RequestMethodString(HTTPRequest::RequestMethod m)
/** HTTP request callback */
static void http_request_cb(struct evhttp_request* req, void* arg)
{
- std::auto_ptr<HTTPRequest> hreq(new HTTPRequest(req));
+ std::unique_ptr<HTTPRequest> hreq(new HTTPRequest(req));
LogPrint("http", "Received a %s request for %s from %s\n",
RequestMethodString(hreq->GetRequestMethod()), hreq->GetURI(), hreq->GetPeer().ToString());
@@ -288,7 +288,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
// Dispatch to worker thread
if (i != iend) {
- std::auto_ptr<HTTPWorkItem> item(new HTTPWorkItem(hreq.release(), path, i->handler));
+ std::unique_ptr<HTTPWorkItem> item(new HTTPWorkItem(hreq.release(), path, i->handler));
assert(workQueue);
if (workQueue->Enqueue(item.get()))
item.release(); /* if true, queue took ownership */