aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
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/cryptonote_core
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/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index a66567239..cdad39a2c 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);
}
};