aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-02-18 14:06:47 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-02-18 14:06:47 -0500
commit6556c33f133782b682938f14360cc6aeb39901c3 (patch)
tree8ee3c410f75a25d63adc96e94c46e81174f6cb2f /src/blockchain_utilities
parentMerge pull request #7352 (diff)
parentRemove copies from foreach loops (thanks to Clang) (diff)
downloadmonero-6556c33f133782b682938f14360cc6aeb39901c3.tar.xz
Merge pull request #7355
bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett) 1572df9 Removing unused namespace alias (Lee Clagett)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_ancestry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp
index 4bf6ade5b..b1b238427 100644
--- a/src/blockchain_utilities/blockchain_ancestry.cpp
+++ b/src/blockchain_utilities/blockchain_ancestry.cpp
@@ -149,7 +149,7 @@ struct ancestry_state_t
{
std::unordered_map<crypto::hash, cryptonote::transaction> old_tx_cache;
a & old_tx_cache;
- for (const auto i: old_tx_cache)
+ for (const auto& i: old_tx_cache)
tx_cache.insert(std::make_pair(i.first, ::tx_data_t(i.second)));
}
else
@@ -161,7 +161,7 @@ struct ancestry_state_t
std::unordered_map<uint64_t, cryptonote::block> old_block_cache;
a & old_block_cache;
block_cache.resize(old_block_cache.size());
- for (const auto i: old_block_cache)
+ for (const auto& i: old_block_cache)
block_cache[i.first] = i.second;
}
else