]> Git Repo - VerusCoin.git/commitdiff
Replace auto_ptr with unique_ptr
authorJack Grigg <[email protected]>
Thu, 29 Sep 2016 01:28:38 +0000 (14:28 +1300)
committerJack Grigg <[email protected]>
Thu, 29 Sep 2016 01:28:38 +0000 (14:28 +1300)
src/miner.cpp
src/rpcmining.cpp

index a27210b6981776f35e3b8279a2984962b09a0557..ae61d32f8dd2292e15b35b66601a8d88da0b26cb 100644 (file)
@@ -100,7 +100,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 {
     const CChainParams& chainparams = Params();
     // Create new block
-    auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
+    unique_ptr<CBlockTemplate> 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<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
+            unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
             if (!pblocktemplate.get())
             {
                 LogPrintf("Error in ZcashMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n");
index fb6b0a5657fb0622db5d95a10eddc850a8fc7e10..d8f2a9b26e6a414235f948d9cdddba12d93c17a3 100644 (file)
@@ -154,7 +154,7 @@ Value generate(const Array& params, bool fHelp)
     unsigned int k = Params().EquihashK();
     while (nHeight < nHeightEnd)
     {
-        auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
+        unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
         if (!pblocktemplate.get())
             throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty");
         CBlock *pblock = &pblocktemplate->block;
This page took 0.029394 seconds and 4 git commands to generate.