From 44333fef0a2c47c58a1887095e10936009d7a7ec Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 11 Apr 2022 16:30:20 -0700 Subject: [PATCH] clang-tidy: use range loop Signed-off-by: Rosen Penev --- src/gui/styles/base/BaseStyle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/base/BaseStyle.cpp b/src/gui/styles/base/BaseStyle.cpp index ec3fd9b8..e9617fc9 100644 --- a/src/gui/styles/base/BaseStyle.cpp +++ b/src/gui/styles/base/BaseStyle.cpp @@ -1156,11 +1156,11 @@ namespace Phantom points[0] = QPointF(0.0, 0.55); points[1] = QPointF(0.4, 1.0); points[2] = QPointF(1.0, 0); - for (int i = 0; i < 3; ++i) { - QPointF pnt = points[i]; + for (auto& point : points) { + QPointF pnt = point; pnt.setX(pnt.x() * dimx + x); pnt.setY(pnt.y() * dimy + y); - points[i] = pnt; + point = pnt; } scratchPen.setBrush(swatch.brush(color)); scratchPen.setCapStyle(Qt::RoundCap);