From b51dc5668714a88d79ddb410d0dcab1559a4bc98 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 13 Dec 2017 11:21:18 +0000 Subject: use const refs in for loops for non tiny types --- src/cryptonote_protocol/block_queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_protocol') diff --git a/src/cryptonote_protocol/block_queue.cpp b/src/cryptonote_protocol/block_queue.cpp index 9e38ffbcb..3844d3751 100644 --- a/src/cryptonote_protocol/block_queue.cpp +++ b/src/cryptonote_protocol/block_queue.cpp @@ -385,7 +385,7 @@ float block_queue::get_speed(const boost::uuids::uuid &connection_id) const i->second = (i->second + span.rate) / 2; } float conn_rate = -1, best_rate = 0; - for (auto i: speeds) + for (const auto &i: speeds) { if (i.first == connection_id) conn_rate = i.second; -- cgit v1.2.3