diff options
author | Lee Clagett <code@leeclagett.com> | 2021-01-28 23:42:40 -0500 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2021-01-28 23:42:40 -0500 |
commit | bd129849f0b634bddf64a195097b15d585e8f2bd (patch) | |
tree | a8aba2ce30da01d1310b468b8cc63dac2e044cf6 /src/blockchain_utilities | |
parent | Removing unused namespace alias (diff) | |
download | monero-bd129849f0b634bddf64a195097b15d585e8f2bd.tar.xz |
Remove copies from foreach loops (thanks to Clang)
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r-- | src/blockchain_utilities/blockchain_ancestry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blockchain_utilities/blockchain_ancestry.cpp b/src/blockchain_utilities/blockchain_ancestry.cpp index 89b932e4f..89c18bbc3 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 |