cleanup: avoid hidden copies in range-for loops

This commit is contained in:
Cory Fields
2018-06-15 13:38:54 -04:00
parent be27048a18
commit 466e16e0e8
6 changed files with 9 additions and 9 deletions

View File

@@ -651,7 +651,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
view.SetBackend(viewMemPool);
// do all inputs exist?
for (const CTxIn txin : tx.vin) {
for (const CTxIn& txin : tx.vin) {
if (!pcoinsTip->HaveCoinInCache(txin.prevout)) {
coins_to_uncache.push_back(txin.prevout);
}
@@ -957,7 +957,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
}
// Remove conflicting transactions from the mempool
for (const CTxMemPool::txiter it : allConflicting)
for (CTxMemPool::txiter it : allConflicting)
{
LogPrint(BCLog::MEMPOOL, "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
it->GetTx().GetHash().ToString(),