avoid a couple needless copies

This commit is contained in:
moneromooo-monero 2020-06-14 18:05:18 +00:00
parent ff4d470629
commit 267ce5b718
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 2 additions and 2 deletions

View file

@ -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;