From f34c8c466a0e514edac2e8683127b4176ad5d321 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 18 Jun 2018 07:58:28 +0200 Subject: Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations. --- src/qt/trafficgraphwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qt/trafficgraphwidget.cpp') diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp index f087e7569c..3aed3f2b97 100644 --- a/src/qt/trafficgraphwidget.cpp +++ b/src/qt/trafficgraphwidget.cpp @@ -141,10 +141,10 @@ void TrafficGraphWidget::updateRates() } float tmax = 0.0f; - for (float f : vSamplesIn) { + for (const float f : vSamplesIn) { if(f > tmax) tmax = f; } - for (float f : vSamplesOut) { + for (const float f : vSamplesOut) { if(f > tmax) tmax = f; } fMax = tmax; -- cgit v1.2.3