diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 4eb9dcb54..c04c9da56 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -217,7 +217,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 hreq(new HTTPRequest(req)); + std::unique_ptr hreq(new HTTPRequest(req)); LogPrint("http", "Received a %s request for %s from %s\n", RequestMethodString(hreq->GetRequestMethod()), hreq->GetURI(), hreq->GetPeer().ToString()); @@ -253,7 +253,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg) // Dispatch to worker thread if (i != iend) { - std::auto_ptr item(new HTTPWorkItem(hreq.release(), path, i->handler)); + std::unique_ptr item(new HTTPWorkItem(hreq.release(), path, i->handler)); assert(workQueue); if (workQueue->Enqueue(item.get())) item.release(); /* if true, queue took ownership */ diff --git a/src/miner.cpp b/src/miner.cpp index 5e2811504..5e03ed9c0 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -110,7 +110,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) { const CChainParams& chainparams = Params(); // Create new block - unique_ptr pblocktemplate(new CBlockTemplate()); + std::unique_ptr pblocktemplate(new CBlockTemplate()); if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index b62b29e9a..e4273e42b 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -206,9 +206,9 @@ UniValue generate(const UniValue& params, bool fHelp) while (nHeight < nHeightEnd) { #ifdef ENABLE_WALLET - unique_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); + std::unique_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); #else - unique_ptr pblocktemplate(CreateNewBlockWithKey()); + std::unique_ptr pblocktemplate(CreateNewBlockWithKey()); #endif if (!pblocktemplate.get()) throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty");