Remove copies from foreach loops (thanks to Clang)

This commit is contained in:
Lee Clagett
2021-01-28 23:42:40 -05:00
parent 1572df9e26
commit bd129849f0
8 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ uint64_t BlockchainDB::add_block( const std::pair<block, blobdata>& blck
num_rct_outs += blk.miner_tx.vout.size();
int tx_i = 0;
crypto::hash tx_hash = crypto::null_hash;
for (const std::pair<transaction, blobdata_ref>& tx : txs)
for (const std::pair<transaction, blobdata>& tx : txs)
{
tx_hash = blk.tx_hashes[tx_i];
add_transaction(blk_hash, tx, &tx_hash);