From 932db634977efff4873cf782c2cbd1aaa76c1672 Mon Sep 17 00:00:00 2001 From: Yann Lossouarn Date: Fri, 23 Feb 2024 18:21:40 +0100 Subject: [PATCH] Code smell improvement: capture 'matrix' by reference instead of capturing by value --- src/app/puzzle/scene/vpgraphicspiece.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/puzzle/scene/vpgraphicspiece.cpp b/src/app/puzzle/scene/vpgraphicspiece.cpp index aa9fe8fc8..9e1be89a0 100644 --- a/src/app/puzzle/scene/vpgraphicspiece.cpp +++ b/src/app/puzzle/scene/vpgraphicspiece.cpp @@ -809,7 +809,7 @@ void VPGraphicsPiece::PaintInternalPaths(QPainter *painter, const VPPiecePtr &pi QVector points = piecePath.Points(); const QTransform matrix = VGObject::FlippingMatrix(piece->GetSeamMirrorLine()); std::transform(points.begin(), points.end(), points.begin(), - [matrix](const VLayoutPoint &point) { return VAbstractPiece::MapPoint(point, matrix); }); + [&matrix](const VLayoutPoint &point) { return VAbstractPiece::MapPoint(point, matrix); }); QVector casted; CastTo(points, casted); path.addPath(piece->GetMatrix().map(VPiecePath::MakePainterPath(casted)));