Code smell improvement: capture 'matrix' by reference instead of capturing by value
This commit is contained in:
parent
b0b451eabd
commit
932db63497
|
@ -809,7 +809,7 @@ void VPGraphicsPiece::PaintInternalPaths(QPainter *painter, const VPPiecePtr &pi
|
||||||
QVector<VLayoutPoint> points = piecePath.Points();
|
QVector<VLayoutPoint> points = piecePath.Points();
|
||||||
const QTransform matrix = VGObject::FlippingMatrix(piece->GetSeamMirrorLine());
|
const QTransform matrix = VGObject::FlippingMatrix(piece->GetSeamMirrorLine());
|
||||||
std::transform(points.begin(), points.end(), points.begin(),
|
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<QPointF> casted;
|
QVector<QPointF> casted;
|
||||||
CastTo(points, casted);
|
CastTo(points, casted);
|
||||||
path.addPath(piece->GetMatrix().map(VPiecePath::MakePainterPath(casted)));
|
path.addPath(piece->GetMatrix().map(VPiecePath::MakePainterPath(casted)));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user