aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_protocol
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-13 11:21:18 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-18 15:15:54 +0000
commitb51dc5668714a88d79ddb410d0dcab1559a4bc98 (patch)
tree343b7443c8193c90eb83bcb96a9d16ae4d2f6e52 /src/cryptonote_protocol
parentnet_parse_helpers: fix regex error checking (diff)
downloadmonero-b51dc5668714a88d79ddb410d0dcab1559a4bc98.tar.xz
use const refs in for loops for non tiny types
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r--src/cryptonote_protocol/block_queue.cpp2
1 files changed, 1 insertions, 1 deletions
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;