From 267ce5b7181474ffbcb6655f54b9332f1e376327 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 14 Jun 2020 18:05:18 +0000 Subject: avoid a couple needless copies --- src/cryptonote_core/blockchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_core') 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; -- cgit v1.2.3