use const refs in for loops for non tiny types

This commit is contained in:
moneromooo-monero 2017-12-13 11:21:18 +00:00
parent f0568ca6ac
commit b51dc56687
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 5 additions and 5 deletions

View file

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