Refactoring.

Remove deprecated constexpr macros.
This commit is contained in:
Roman Telezhynskyi 2024-04-17 11:43:48 +03:00
parent 6e6629b77c
commit 47a589c8d8
19 changed files with 118 additions and 118 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<pattern labelPrefix="en" passmarkLength=""> <pattern labelPrefix="en" passmarkLength="">
<!--Pattern created with Valentina v0.7.52.0 (https://smart-pattern.com.ua/).--> <!--Pattern created with Valentina v0.7.52.0 (https://smart-pattern.com.ua/).-->
<version>0.9.2</version> <version>0.9.1</version>
<unit>cm</unit> <unit>cm</unit>
<description>Jeans mit gerader Seitennaht <description>Jeans mit gerader Seitennaht
Müller u. Sohn Zeitschrift Ausgabe 10.20 , Seite 47-50 vom PDf (bzw. 14 - 17 vom Herrenteil)</description> Müller u. Sohn Zeitschrift Ausgabe 10.20 , Seite 47-50 vom PDf (bzw. 14 - 17 vom Herrenteil)</description>

View File

@ -43,8 +43,8 @@ public:
static const QString KnownMeasurementsMaxVerStr; static const QString KnownMeasurementsMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned KnownMeasurementsMinVer = FormatVersion(1, 0, 0); static constexpr const unsigned KnownMeasurementsMinVer = FormatVersion(1, 0, 0);
static Q_DECL_CONSTEXPR const unsigned KnownMeasurementsMaxVer = FormatVersion(1, 0, 0); static constexpr const unsigned KnownMeasurementsMaxVer = FormatVersion(1, 0, 0);
static auto XSDSchemas() -> QHash<unsigned, QString>; static auto XSDSchemas() -> QHash<unsigned, QString>;

View File

@ -40,8 +40,8 @@ public:
static const QString LabelTemplateMaxVerStr; static const QString LabelTemplateMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned LabelTemplateMinVer = FormatVersion(1, 0, 0); static constexpr const unsigned LabelTemplateMinVer = FormatVersion(1, 0, 0);
static Q_DECL_CONSTEXPR const unsigned LabelTemplateMaxVer = FormatVersion(1, 0, 0); static constexpr const unsigned LabelTemplateMaxVer = FormatVersion(1, 0, 0);
static auto XSDSchemas() -> QHash <unsigned, QString>; static auto XSDSchemas() -> QHash <unsigned, QString>;

View File

@ -46,8 +46,8 @@ public:
static const QString LayoutMaxVerStr; static const QString LayoutMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned LayoutMinVer = FormatVersion(0, 1, 0); static constexpr const unsigned LayoutMinVer = FormatVersion(0, 1, 0);
static Q_DECL_CONSTEXPR const unsigned LayoutMaxVer = FormatVersion(0, 1, 9); static constexpr const unsigned LayoutMaxVer = FormatVersion(0, 1, 9);
static auto XSDSchemas() -> QHash<unsigned, QString>; static auto XSDSchemas() -> QHash<unsigned, QString>;

View File

@ -53,8 +53,8 @@ public:
static const QString PatternMaxVerStr; static const QString PatternMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned PatternMinVer = FormatVersion(0, 1, 4); static constexpr const unsigned PatternMinVer = FormatVersion(0, 1, 4);
static Q_DECL_CONSTEXPR const unsigned PatternMaxVer = FormatVersion(0, 9, 5); static constexpr const unsigned PatternMaxVer = FormatVersion(0, 9, 5);
static auto XSDSchemas() -> QHash<unsigned, QString>; static auto XSDSchemas() -> QHash<unsigned, QString>;

View File

@ -48,8 +48,8 @@ public:
static const QString MeasurementMaxVerStr; static const QString MeasurementMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned MeasurementMinVer = FormatVersion(0, 2, 0); static constexpr const unsigned MeasurementMinVer = FormatVersion(0, 2, 0);
static Q_DECL_CONSTEXPR const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); static constexpr const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1);
static auto XSDSchemas() -> QHash<unsigned, QString>; static auto XSDSchemas() -> QHash<unsigned, QString>;

View File

@ -48,8 +48,8 @@ public:
static const QString MeasurementMaxVerStr; static const QString MeasurementMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned MeasurementMinVer = FormatVersion(0, 3, 0); static constexpr const unsigned MeasurementMinVer = FormatVersion(0, 3, 0);
static Q_DECL_CONSTEXPR const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); static constexpr const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1);
static auto XSDSchemas() -> QHash<unsigned, QString>; static auto XSDSchemas() -> QHash<unsigned, QString>;

View File

@ -39,8 +39,8 @@ public:
static const QString WatermarkMaxVerStr; static const QString WatermarkMaxVerStr;
static const QString CurrentSchema; static const QString CurrentSchema;
static Q_DECL_CONSTEXPR const unsigned WatermarkMinVer = FormatVersion(1, 0, 0); static constexpr const unsigned WatermarkMinVer = FormatVersion(1, 0, 0);
static Q_DECL_CONSTEXPR const unsigned WatermarkMaxVer = FormatVersion(1, 1, 0); static constexpr const unsigned WatermarkMaxVer = FormatVersion(1, 1, 0);
static auto XSDSchemas() -> QHash <unsigned, QString>; static auto XSDSchemas() -> QHash <unsigned, QString>;

View File

@ -523,7 +523,7 @@ auto VAbstractCubicBezier::GetParmT(qreal length) const -> qreal
length = base; length = base;
} }
Q_DECL_RELAXED_CONSTEXPR qreal eps = ToPixel(0.00001, Unit::Mm); constexpr qreal eps = ToPixel(0.00001, Unit::Mm);
qreal parT = 0.5; qreal parT = 0.5;
qreal step = parT; qreal step = parT;
qreal splLength = 0; qreal splLength = 0;

View File

@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, mCI, ("CI"_L1)) // NOLINT circle
QT_WARNING_POP QT_WARNING_POP
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto ConvertPixels(qreal pix) -> qreal constexpr inline auto ConvertPixels(qreal pix) -> qreal
{ {
// Default plating measurement in the HP-GL(HP-GL/2) graphics mode is 1/1016"(0.025mm). // Default plating measurement in the HP-GL(HP-GL/2) graphics mode is 1/1016"(0.025mm).
// 40 plotter units = 1 mm // 40 plotter units = 1 mm

View File

@ -75,7 +75,7 @@ inline auto IsOutsidePoint(QPointF p1, QPointF p2, QPointF px) -> bool
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR auto PointPosition(const QPointF &p, const QLineF &line) -> qreal constexpr auto PointPosition(const QPointF &p, const QLineF &line) -> qreal
{ {
return (line.p2().x() - line.p1().x()) * (p.y() - line.p1().y()) - return (line.p2().x() - line.p1().x()) * (p.y() - line.p1().y()) -
(line.p2().y() - line.p1().y()) * (p.x() - line.p1().x()); (line.p2().y() - line.p1().y()) * (p.x() - line.p1().x());

View File

@ -33,7 +33,7 @@
namespace namespace
{ {
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto Square(QSizeF size) -> qint64 constexpr inline auto Square(QSizeF size) -> qint64
{ {
return static_cast<qint64>(size.width() * size.height()); return static_cast<qint64>(size.width() * size.height());
} }

View File

@ -41,15 +41,15 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor")
class VLayoutPoint : public QPointF class VLayoutPoint : public QPointF
{ {
public: public:
Q_DECL_CONSTEXPR VLayoutPoint() = default; constexpr VLayoutPoint() = default;
Q_DECL_CONSTEXPR VLayoutPoint(qreal xpos, qreal ypos); constexpr VLayoutPoint(qreal xpos, qreal ypos);
Q_DECL_CONSTEXPR explicit VLayoutPoint(QPointF p); constexpr explicit VLayoutPoint(QPointF p);
Q_DECL_CONSTEXPR auto TurnPoint() const -> bool; constexpr auto TurnPoint() const -> bool;
Q_DECL_CONSTEXPR auto CurvePoint() const -> bool; constexpr auto CurvePoint() const -> bool;
Q_DECL_RELAXED_CONSTEXPR void SetTurnPoint(bool newTurnPoint); constexpr void SetTurnPoint(bool newTurnPoint);
Q_DECL_RELAXED_CONSTEXPR void SetCurvePoint(bool newCurvePoint); constexpr void SetCurvePoint(bool newCurvePoint);
auto toJson() const -> QJsonObject; auto toJson() const -> QJsonObject;
auto ToQPointF() const -> QPointF; auto ToQPointF() const -> QPointF;
@ -104,37 +104,37 @@ auto operator>>(QDataStream &, VLayoutPoint &) -> QDataStream &;
#endif #endif
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VLayoutPoint::VLayoutPoint(qreal xpos, qreal ypos) constexpr inline VLayoutPoint::VLayoutPoint(qreal xpos, qreal ypos)
: QPointF(xpos, ypos) : QPointF(xpos, ypos)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VLayoutPoint::VLayoutPoint(QPointF p) constexpr inline VLayoutPoint::VLayoutPoint(QPointF p)
: QPointF(p) : QPointF(p)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VLayoutPoint::TurnPoint() const -> bool constexpr inline auto VLayoutPoint::TurnPoint() const -> bool
{ {
return m_turnPoint; return m_turnPoint;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VLayoutPoint::SetTurnPoint(bool newTurnPoint) constexpr inline void VLayoutPoint::SetTurnPoint(bool newTurnPoint)
{ {
m_turnPoint = newTurnPoint; m_turnPoint = newTurnPoint;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VLayoutPoint::CurvePoint() const -> bool constexpr inline auto VLayoutPoint::CurvePoint() const -> bool
{ {
return m_curvePoint; return m_curvePoint;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VLayoutPoint::SetCurvePoint(bool newCurvePoint) constexpr inline void VLayoutPoint::SetCurvePoint(bool newCurvePoint)
{ {
m_curvePoint = newCurvePoint; m_curvePoint = newCurvePoint;
} }

View File

@ -41,18 +41,18 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor")
class VRawSAPoint final : public VLayoutPoint class VRawSAPoint final : public VLayoutPoint
{ {
public: public:
Q_DECL_CONSTEXPR VRawSAPoint() = default; constexpr VRawSAPoint() = default;
Q_DECL_CONSTEXPR VRawSAPoint(qreal xpos, qreal ypos); constexpr VRawSAPoint(qreal xpos, qreal ypos);
Q_DECL_CONSTEXPR explicit VRawSAPoint(QPointF p); constexpr explicit VRawSAPoint(QPointF p);
Q_DECL_CONSTEXPR explicit VRawSAPoint(const VLayoutPoint &p); constexpr explicit VRawSAPoint(const VLayoutPoint &p);
Q_DECL_RELAXED_CONSTEXPR VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint); constexpr VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint);
Q_DECL_RELAXED_CONSTEXPR VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint); constexpr VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint);
Q_DECL_CONSTEXPR auto LoopPoint() const -> bool; constexpr auto LoopPoint() const -> bool;
Q_DECL_RELAXED_CONSTEXPR void SetLoopPoint(bool loopPoint); constexpr void SetLoopPoint(bool loopPoint);
Q_DECL_CONSTEXPR auto Primary() const -> bool; constexpr auto Primary() const -> bool;
Q_DECL_RELAXED_CONSTEXPR void SetPrimary(bool primary); constexpr void SetPrimary(bool primary);
auto toJson() const -> QJsonObject; auto toJson() const -> QJsonObject;
@ -65,25 +65,25 @@ Q_DECLARE_METATYPE(VRawSAPoint) // NOLINT
Q_DECLARE_TYPEINFO(VRawSAPoint, Q_MOVABLE_TYPE); // NOLINT Q_DECLARE_TYPEINFO(VRawSAPoint, Q_MOVABLE_TYPE); // NOLINT
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(qreal xpos, qreal ypos) constexpr inline VRawSAPoint::VRawSAPoint(qreal xpos, qreal ypos)
: VLayoutPoint(xpos, ypos) : VLayoutPoint(xpos, ypos)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p) constexpr inline VRawSAPoint::VRawSAPoint(QPointF p)
: VLayoutPoint(p) : VLayoutPoint(p)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(const VLayoutPoint &p) constexpr inline VRawSAPoint::VRawSAPoint(const VLayoutPoint &p)
: VLayoutPoint(p) : VLayoutPoint(p)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint) constexpr inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint)
: VLayoutPoint(p) : VLayoutPoint(p)
{ {
SetCurvePoint(curvePoint); SetCurvePoint(curvePoint);
@ -91,7 +91,7 @@ Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePo
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint) constexpr inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint)
: VLayoutPoint(p), : VLayoutPoint(p),
m_loopPoint(loopPoint) m_loopPoint(loopPoint)
{ {
@ -100,25 +100,25 @@ Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePo
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VRawSAPoint::LoopPoint() const -> bool constexpr inline auto VRawSAPoint::LoopPoint() const -> bool
{ {
return m_loopPoint; return m_loopPoint;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VRawSAPoint::SetLoopPoint(bool loopPoint) constexpr inline void VRawSAPoint::SetLoopPoint(bool loopPoint)
{ {
m_loopPoint = loopPoint; m_loopPoint = loopPoint;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VRawSAPoint::Primary() const -> bool constexpr inline auto VRawSAPoint::Primary() const -> bool
{ {
return m_primary; return m_primary;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VRawSAPoint::SetPrimary(bool primary) constexpr inline void VRawSAPoint::SetPrimary(bool primary)
{ {
m_primary = primary; m_primary = primary;
} }

View File

@ -46,46 +46,46 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor")
class VSAPoint final : public VLayoutPoint class VSAPoint final : public VLayoutPoint
{ {
public: public:
Q_DECL_CONSTEXPR VSAPoint() noexcept; constexpr VSAPoint() noexcept;
Q_DECL_CONSTEXPR VSAPoint(qreal xpos, qreal ypos); constexpr VSAPoint(qreal xpos, qreal ypos);
Q_DECL_CONSTEXPR explicit VSAPoint(QPointF p); constexpr explicit VSAPoint(QPointF p);
Q_DECL_CONSTEXPR explicit VSAPoint(const VLayoutPoint &p); constexpr explicit VSAPoint(const VLayoutPoint &p);
Q_DECL_CONSTEXPR auto GetSABefore() const -> qreal; constexpr auto GetSABefore() const -> qreal;
Q_DECL_CONSTEXPR auto GetSAAfter() const -> qreal; constexpr auto GetSAAfter() const -> qreal;
Q_DECL_CONSTEXPR auto GetAngleType() const -> PieceNodeAngle; constexpr auto GetAngleType() const -> PieceNodeAngle;
Q_DECL_CONSTEXPR auto IsManualPasskmarkLength() const -> bool; constexpr auto IsManualPasskmarkLength() const -> bool;
Q_DECL_CONSTEXPR auto IsManualPasskmarkWidth() const -> bool; constexpr auto IsManualPasskmarkWidth() const -> bool;
Q_DECL_CONSTEXPR auto IsManualPasskmarkAngle() const -> bool; constexpr auto IsManualPasskmarkAngle() const -> bool;
Q_DECL_CONSTEXPR auto GetPasskmarkLength() const -> qreal; constexpr auto GetPasskmarkLength() const -> qreal;
Q_DECL_CONSTEXPR auto GetPasskmarkWidth() const -> qreal; constexpr auto GetPasskmarkWidth() const -> qreal;
Q_DECL_CONSTEXPR auto GetPasskmarkAngle() const -> qreal; constexpr auto GetPasskmarkAngle() const -> qreal;
Q_DECL_RELAXED_CONSTEXPR auto GetSABefore(qreal width) const -> qreal; constexpr auto GetSABefore(qreal width) const -> qreal;
Q_DECL_RELAXED_CONSTEXPR auto GetSAAfter(qreal width) const -> qreal; constexpr auto GetSAAfter(qreal width) const -> qreal;
Q_DECL_RELAXED_CONSTEXPR void SetSABefore(qreal value); constexpr void SetSABefore(qreal value);
Q_DECL_RELAXED_CONSTEXPR void SetSAAfter(qreal value); constexpr void SetSAAfter(qreal value);
Q_DECL_RELAXED_CONSTEXPR void SetAngleType(PieceNodeAngle value); constexpr void SetAngleType(PieceNodeAngle value);
Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkLength(bool value); constexpr void SetManualPasskmarkLength(bool value);
Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkWidth(bool value); constexpr void SetManualPasskmarkWidth(bool value);
Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkAngle(bool value); constexpr void SetManualPasskmarkAngle(bool value);
Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkLength(qreal value); constexpr void SetPasskmarkLength(qreal value);
Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkWidth(qreal value); constexpr void SetPasskmarkWidth(qreal value);
Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkAngle(qreal value); constexpr void SetPasskmarkAngle(qreal value);
Q_DECL_RELAXED_CONSTEXPR auto MaxLocalSA(qreal width) const -> qreal; constexpr auto MaxLocalSA(qreal width) const -> qreal;
Q_DECL_RELAXED_CONSTEXPR auto PassmarkLength(qreal width) const -> qreal; constexpr auto PassmarkLength(qreal width) const -> qreal;
Q_DECL_CONSTEXPR auto IsPassmarkClockwiseOpening() const -> bool; constexpr auto IsPassmarkClockwiseOpening() const -> bool;
Q_DECL_RELAXED_CONSTEXPR void SetPassmarkClockwiseOpening(bool clockwise); constexpr void SetPassmarkClockwiseOpening(bool clockwise);
auto toJson() const -> QJsonObject; auto toJson() const -> QJsonObject;
@ -110,36 +110,36 @@ Q_DECLARE_METATYPE(VSAPoint) // NOLINT
Q_DECLARE_TYPEINFO(VSAPoint, Q_MOVABLE_TYPE); // NOLINT Q_DECLARE_TYPEINFO(VSAPoint, Q_MOVABLE_TYPE); // NOLINT
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint() noexcept // NOLINT(hicpp-use-equals-default) constexpr inline VSAPoint::VSAPoint() noexcept // NOLINT(hicpp-use-equals-default)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(qreal xpos, qreal ypos) constexpr inline VSAPoint::VSAPoint(qreal xpos, qreal ypos)
: VLayoutPoint(xpos, ypos) : VLayoutPoint(xpos, ypos)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(QPointF p) constexpr inline VSAPoint::VSAPoint(QPointF p)
: VLayoutPoint(p) : VLayoutPoint(p)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(const VLayoutPoint &p) constexpr inline VSAPoint::VSAPoint(const VLayoutPoint &p)
: VLayoutPoint(p) : VLayoutPoint(p)
{ {
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetSABefore() const -> qreal constexpr inline auto VSAPoint::GetSABefore() const -> qreal
{ {
return m_before; return m_before;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSABefore(qreal width) const -> qreal constexpr inline auto VSAPoint::GetSABefore(qreal width) const -> qreal
{ {
if (m_before < 0) if (m_before < 0)
{ {
@ -149,19 +149,19 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSABefore(qreal width) const ->
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetSABefore(qreal value) constexpr inline void VSAPoint::SetSABefore(qreal value)
{ {
value < 0 ? m_before = -1 : m_before = value; value < 0 ? m_before = -1 : m_before = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetSAAfter() const -> qreal constexpr inline auto VSAPoint::GetSAAfter() const -> qreal
{ {
return m_after; return m_after;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSAAfter(qreal width) const -> qreal constexpr inline auto VSAPoint::GetSAAfter(qreal width) const -> qreal
{ {
if (m_after < 0) if (m_after < 0)
{ {
@ -171,103 +171,103 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSAAfter(qreal width) const ->
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetSAAfter(qreal value) constexpr inline void VSAPoint::SetSAAfter(qreal value)
{ {
value < 0 ? m_after = -1 : m_after = value; value < 0 ? m_after = -1 : m_after = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetAngleType() const -> PieceNodeAngle constexpr inline auto VSAPoint::GetAngleType() const -> PieceNodeAngle
{ {
return m_angle; return m_angle;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetAngleType(PieceNodeAngle value) constexpr inline void VSAPoint::SetAngleType(PieceNodeAngle value)
{ {
m_angle = value; m_angle = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkLength() const -> bool constexpr inline auto VSAPoint::IsManualPasskmarkLength() const -> bool
{ {
return m_manualPassmarkLength; return m_manualPassmarkLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkWidth() const -> bool constexpr inline auto VSAPoint::IsManualPasskmarkWidth() const -> bool
{ {
return m_manualPassmarkWidth; return m_manualPassmarkWidth;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkAngle() const -> bool constexpr inline auto VSAPoint::IsManualPasskmarkAngle() const -> bool
{ {
return m_manualPassmarkAngle; return m_manualPassmarkAngle;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkLength(bool value) constexpr inline void VSAPoint::SetManualPasskmarkLength(bool value)
{ {
m_manualPassmarkLength = value; m_manualPassmarkLength = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkWidth(bool value) constexpr inline void VSAPoint::SetManualPasskmarkWidth(bool value)
{ {
m_manualPassmarkWidth = value; m_manualPassmarkWidth = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkAngle(bool value) constexpr inline void VSAPoint::SetManualPasskmarkAngle(bool value)
{ {
m_manualPassmarkAngle = value; m_manualPassmarkAngle = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkLength() const -> qreal constexpr inline auto VSAPoint::GetPasskmarkLength() const -> qreal
{ {
return m_passmarkLength; return m_passmarkLength;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkWidth() const -> qreal constexpr inline auto VSAPoint::GetPasskmarkWidth() const -> qreal
{ {
return m_passmarkWidth; return m_passmarkWidth;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkAngle() const -> qreal constexpr inline auto VSAPoint::GetPasskmarkAngle() const -> qreal
{ {
return m_passmarkAngle; return m_passmarkAngle;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkLength(qreal value) constexpr inline void VSAPoint::SetPasskmarkLength(qreal value)
{ {
m_passmarkLength = value; m_passmarkLength = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkWidth(qreal value) constexpr inline void VSAPoint::SetPasskmarkWidth(qreal value)
{ {
m_passmarkWidth = value; m_passmarkWidth = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkAngle(qreal value) constexpr inline void VSAPoint::SetPasskmarkAngle(qreal value)
{ {
m_passmarkAngle = value; m_passmarkAngle = value;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::MaxLocalSA(qreal width) const -> qreal constexpr inline auto VSAPoint::MaxLocalSA(qreal width) const -> qreal
{ {
return qMax(GetSAAfter(width), GetSABefore(width)); return qMax(GetSAAfter(width), GetSABefore(width));
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::PassmarkLength(qreal width) const -> qreal constexpr inline auto VSAPoint::PassmarkLength(qreal width) const -> qreal
{ {
if (not m_manualPassmarkLength) if (not m_manualPassmarkLength)
{ {
@ -280,13 +280,13 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::PassmarkLength(qreal width) const
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_CONSTEXPR inline auto VSAPoint::IsPassmarkClockwiseOpening() const -> bool constexpr inline auto VSAPoint::IsPassmarkClockwiseOpening() const -> bool
{ {
return m_passmarkClockwiseOpening; return m_passmarkClockwiseOpening;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPassmarkClockwiseOpening(bool clockwise) constexpr inline void VSAPoint::SetPassmarkClockwiseOpening(bool clockwise)
{ {
m_passmarkClockwiseOpening = clockwise; m_passmarkClockwiseOpening = clockwise;
} }

View File

@ -489,7 +489,7 @@ template <typename T> constexpr inline auto InchToPixel(T val) noexcept -> T
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto ToPixel(double val, const Unit &unit) noexcept -> double constexpr inline auto ToPixel(double val, const Unit &unit) noexcept -> double
{ {
switch (unit) switch (unit)
{ {
@ -526,7 +526,7 @@ template <typename T> constexpr inline auto PixelToCm(T pix) -> T
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel(double pix, const Unit &unit) -> double constexpr inline auto FromPixel(double pix, const Unit &unit) -> double
{ {
switch (unit) switch (unit)
{ {
@ -565,7 +565,7 @@ template <typename T> constexpr inline auto Cm2ToPixel2(T val) -> T
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto ToPixel2(double val, const Unit &unit) -> double constexpr inline auto ToPixel2(double val, const Unit &unit) -> double
{ {
switch (unit) switch (unit)
{ {
@ -604,7 +604,7 @@ template <typename T> constexpr inline auto Pixel2ToCm2(T pix) -> T
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel2(double pix, const Unit &unit) -> double constexpr inline auto FromPixel2(double pix, const Unit &unit) -> double
{ {
switch (unit) switch (unit)
{ {
@ -623,7 +623,7 @@ Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel2(double pix, const Unit &unit) ->
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(qreal value, const Unit &from, const Unit &to) -> qreal constexpr inline auto UnitConvertor(qreal value, const Unit &from, const Unit &to) -> qreal
{ {
switch (from) switch (from)
{ {
@ -698,7 +698,7 @@ Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(qreal value, const Unit &from
* @brief UnitConvertor Converts the values of the given margin from given unit to the new unit. * @brief UnitConvertor Converts the values of the given margin from given unit to the new unit.
* returns a new instand of QMarginsF. * returns a new instand of QMarginsF.
*/ */
Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(const QMarginsF &margins, const Unit &from, const Unit &to) constexpr inline auto UnitConvertor(const QMarginsF &margins, const Unit &from, const Unit &to)
-> QMarginsF -> QMarginsF
{ {
const qreal left = UnitConvertor(margins.left(), from, to); const qreal left = UnitConvertor(margins.left(), from, to);
@ -725,8 +725,8 @@ Q_REQUIRED_RESULT auto darkenPixmap(const QPixmap &pixmap) -> QPixmap;
void ShowInGraphicalShell(const QString &filePath); void ShowInGraphicalShell(const QString &filePath);
Q_REQUIRED_RESULT Q_DECL_RELAXED_CONSTEXPR static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool; Q_REQUIRED_RESULT constexpr static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool;
Q_DECL_RELAXED_CONSTEXPR static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool constexpr static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool
{ {
if (qFuzzyIsNull(p1)) if (qFuzzyIsNull(p1))
{ {

View File

@ -70,7 +70,7 @@ using namespace Qt::Literals::StringLiterals;
namespace namespace
{ {
Q_DECL_CONSTEXPR auto DAYS_TO_KEEP_LOGS = 3; constexpr auto DAYS_TO_KEEP_LOGS = 3;
auto FilterLocales(const QStringList &locales) -> QStringList auto FilterLocales(const QStringList &locales) -> QStringList
{ {

View File

@ -51,7 +51,7 @@
#define M_EULER (0.57721566490153286060) #define M_EULER (0.57721566490153286060)
#endif #endif
template <typename T> Q_DECL_CONSTEXPR inline auto vRound(T d, int p) -> T template <typename T> constexpr inline auto vRound(T d, int p) -> T
{ return p > 0 ? qRound(d * (p * 10.0)) / (p * 10.0) : qRound(d); } { return p > 0 ? qRound(d * (p * 10.0)) / (p * 10.0) : qRound(d); }
#endif // VMATH_H #endif // VMATH_H

View File

@ -902,7 +902,7 @@ void TST_VSpline::TestCutSpline()
VSpline spline1(spl.GetP1(), spl1p2, spl1p3, p); VSpline spline1(spl.GetP1(), spl1p2, spl1p3, p);
spline1.SetApproximationScale(0.5); spline1.SetApproximationScale(0.5);
Q_DECL_RELAXED_CONSTEXPR qreal eps = ToPixel(0.0001, Unit::Mm); constexpr qreal eps = ToPixel(0.0001, Unit::Mm);
QVERIFY(UnitConvertor(spline1.GetLength(), Unit::Px, Unit::Cm) - result < eps); QVERIFY(UnitConvertor(spline1.GetLength(), Unit::Px, Unit::Cm) - result < eps);
} }