Code style.

This commit is contained in:
Roman Telezhynskyi 2022-03-16 17:43:22 +02:00
parent 8b0b5c89aa
commit 0644122345
3 changed files with 6 additions and 11 deletions

View File

@ -366,12 +366,9 @@ QVector<QPointF> PointBezier_r(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3,
const QVector<QPointF> tail = BezierTailPoints(); const QVector<QPointF> tail = BezierTailPoints();
return futureBezier.result() + tail; return futureBezier.result() + tail;
} }
else return BezierPoints() + BezierTailPoints();
{
return BezierPoints() + BezierTailPoints();
}
}
} }
} // namespace
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VAbstractCubicBezier::VAbstractCubicBezier(const GOType &type, const quint32 &idObject, const Draw &mode) VAbstractCubicBezier::VAbstractCubicBezier(const GOType &type, const quint32 &idObject, const Draw &mode)

View File

@ -222,10 +222,8 @@ qint32 VSplinePath::CountSubSpl() const
{ {
return 0; return 0;
} }
else
{ return d->path.size() - 1;
return d->path.size() - 1;
}
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------

View File

@ -779,7 +779,7 @@ bool VToolSplinePath::IsMovable(int index) const
void VToolSplinePath::RefreshCtrlPoints() void VToolSplinePath::RefreshCtrlPoints()
{ {
// Very important to disable control points. Without it the pogram can't move the curve. // Very important to disable control points. Without it the pogram can't move the curve.
for (auto point : qAsConst(controlPoints)) for (auto *point : qAsConst(controlPoints))
{ {
point->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false); point->setFlag(QGraphicsItem::ItemSendsGeometryChanges, false);
} }
@ -841,7 +841,7 @@ void VToolSplinePath::RefreshCtrlPoints()
controlPoints[j-1]->blockSignals(false); controlPoints[j-1]->blockSignals(false);
} }
for (auto point : qAsConst(controlPoints)) for (auto *point : qAsConst(controlPoints))
{ {
point->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); point->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
} }