Since C++20 we no longer need operator!=.

develop
Roman Telezhynskyi 2024-02-17 11:41:47 +02:00
parent be5b6d5b1f
commit f353b02530
4 changed files with 12 additions and 2 deletions

View File

@ -89,8 +89,10 @@ auto VPTransformationOrigon::operator==(const VPTransformationOrigon &origin) co
return this->origin == origin.origin && custom == origin.custom;
}
#if __cplusplus < 202002L
//---------------------------------------------------------------------------------------------------------------------
auto VPTransformationOrigon::operator!=(const VPTransformationOrigon &origin) const -> bool
{
return !VPTransformationOrigon::operator==(origin);
}
#endif

View File

@ -55,11 +55,14 @@ auto StrToGrainlineType(const QString &string) -> GrainlineType;
struct VPTransformationOrigon
{
QPointF origin{}; // NOLINT(misc-non-private-member-variables-in-classes)
bool custom{false}; // NOLINT(misc-non-private-member-variables-in-classes)
QPointF origin{}; // NOLINT(misc-non-private-member-variables-in-classes)
bool custom{false}; // NOLINT(misc-non-private-member-variables-in-classes)
auto operator==(const VPTransformationOrigon &origin) const -> bool;
#if __cplusplus < 202002L
auto operator!=(const VPTransformationOrigon &origin) const -> bool;
#endif
};
#endif // LAYOUTDEF_H

View File

@ -87,11 +87,13 @@ auto VFormula::operator==(const VFormula &formula) const -> bool
d->error == formula.error() && VFuzzyComparePossibleNulls(d->dValue, formula.getDoubleValue());
}
#if __cplusplus < 202002L
//---------------------------------------------------------------------------------------------------------------------
auto VFormula::operator!=(const VFormula &formula) const -> bool
{
return !VFormula::operator==(formula);
}
#endif
//---------------------------------------------------------------------------------------------------------------------
auto VFormula::GetFormula(FormulaType type) const -> QString

View File

@ -59,7 +59,10 @@ public:
~VFormula();
auto operator==(const VFormula &formula) const -> bool;
#if __cplusplus < 202002L
auto operator!=(const VFormula &formula) const -> bool;
#endif
auto GetFormula(FormulaType type = FormulaType::ToUser) const -> QString;
void SetFormula(const QString &value, FormulaType type = FormulaType::FromSystem);