Code smell improvement: capture variable by reference

This commit is contained in:
Yann Lossouarn 2024-02-23 18:31:01 +01:00
parent 932db63497
commit 7ff8aed6bc

View File

@ -893,7 +893,7 @@ void VPGraphicsPiece::PaintPlaceLabels(QPainter *painter, const VPPiecePtr &piec
for (auto &points : shape)
{
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); });
}
path.addPath(VAbstractPiece::LabelShapePath(piece->MapPlaceLabelShape(shape)));