Refactoring.

This commit is contained in:
Roman Telezhynskyi 2024-04-16 18:20:53 +03:00
parent 708d626524
commit 6e6629b77c

View File

@ -221,18 +221,18 @@ template <class T>
inline auto VAbstractPiece::CheckPointOnLine(QVector<T> &points, const T &iPoint, const T &prevPoint, inline auto VAbstractPiece::CheckPointOnLine(QVector<T> &points, const T &iPoint, const T &prevPoint,
const T &nextPoint) -> bool const T &nextPoint) -> bool
{ {
if (not IsEkvPointOnLine(iPoint, prevPoint, nextPoint)) if (!IsEkvPointOnLine(iPoint, prevPoint, nextPoint))
{ {
points.append(iPoint); points.append(iPoint);
return false; return false;
} }
if (not points.isEmpty() && iPoint.TurnPoint()) if (!points.isEmpty() && iPoint.TurnPoint())
{ {
points.last().SetTurnPoint(true); points.last().SetTurnPoint(true);
} }
if (not points.isEmpty() && iPoint.CurvePoint()) if (!points.isEmpty() && iPoint.CurvePoint())
{ {
points.last().SetCurvePoint(true); points.last().SetCurvePoint(true);
} }
@ -245,7 +245,7 @@ template <>
inline auto VAbstractPiece::CheckPointOnLine<QPointF>(QVector<QPointF> &points, const QPointF &iPoint, inline auto VAbstractPiece::CheckPointOnLine<QPointF>(QVector<QPointF> &points, const QPointF &iPoint,
const QPointF &prevPoint, const QPointF &nextPoint) -> bool const QPointF &prevPoint, const QPointF &nextPoint) -> bool
{ {
if (not IsEkvPointOnLine(iPoint, prevPoint, nextPoint)) if (!IsEkvPointOnLine(iPoint, prevPoint, nextPoint))
{ {
points.append(iPoint); points.append(iPoint);
return false; return false;