aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-06-14 18:05:18 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-06-14 18:05:35 +0000
commit267ce5b7181474ffbcb6655f54b9332f1e376327 (patch)
tree501018e7dd00ec69f23ea378f97d78d2082fd6db /src/cryptonote_core
parentMerge pull request #6576 (diff)
downloadmonero-267ce5b7181474ffbcb6655f54b9332f1e376327.tar.xz
avoid a couple needless copies
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index fb2c71a3a..3803ef1f6 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1106,7 +1106,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
size_t count = 0;
size_t max_i = timestamps.size()-1;
// get difficulties and timestamps from most recent blocks in alt chain
- for (const auto bei: boost::adaptors::reverse(alt_chain))
+ for (const auto &bei: boost::adaptors::reverse(alt_chain))
{
timestamps[max_i - count] = bei.bl.timestamp;
cumulative_difficulties[max_i - count] = bei.cumulative_difficulty;