From 4dddc096d45b25913ed6b15a3162cc4ffc796dc9 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 29 Sep 2016 14:28:38 +1300 Subject: [PATCH] Replace auto_ptr with unique_ptr --- src/miner.cpp | 4 ++-- src/rpcmining.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index a27210b69..ae61d32f8 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -100,7 +100,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) { const CChainParams& chainparams = Params(); // Create new block - auto_ptr pblocktemplate(new CBlockTemplate()); + unique_ptr pblocktemplate(new CBlockTemplate()); if(!pblocktemplate.get()) return NULL; CBlock *pblock = &pblocktemplate->block; // pointer for convenience @@ -488,7 +488,7 @@ void static BitcoinMiner(CWallet *pwallet) unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated(); CBlockIndex* pindexPrev = chainActive.Tip(); - auto_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); + unique_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); if (!pblocktemplate.get()) { LogPrintf("Error in ZcashMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n"); diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index fb6b0a565..d8f2a9b26 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -154,7 +154,7 @@ Value generate(const Array& params, bool fHelp) unsigned int k = Params().EquihashK(); while (nHeight < nHeightEnd) { - auto_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); + unique_ptr pblocktemplate(CreateNewBlockWithKey(reservekey)); if (!pblocktemplate.get()) throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty"); CBlock *pblock = &pblocktemplate->block;