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/cryptonote_core | |
parent | Removing unused namespace alias (diff) | |
download | monero-bd129849f0b634bddf64a195097b15d585e8f2bd.tar.xz |
Remove copies from foreach loops (thanks to Clang)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 | ||||
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 8ec624254..d160cc66f 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -973,7 +973,7 @@ start: std::pair<bool, uint64_t> Blockchain::check_difficulty_checkpoints() const { uint64_t res = 0; - for (const std::pair<uint64_t, difficulty_type>& i : m_checkpoints.get_difficulty_points()) + for (const std::pair<const uint64_t, difficulty_type>& i : m_checkpoints.get_difficulty_points()) { if (i.first >= m_db->height()) break; diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 12125fb9d..57104fd59 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -630,7 +630,7 @@ namespace cryptonote void operator()(std::uint64_t, epee::span<const block> blocks) const { - for (const block bl : blocks) + for (const block& bl : blocks) cmdline.notify("%s", epee::string_tools::pod_to_hex(get_block_hash(bl)).c_str(), NULL); } }; |