Base: add missing != operator to Quantity

This commit is contained in:
wmayer
2023-02-27 15:43:13 +01:00
committed by wwmayer
parent daa23162a4
commit 7204be47f2
2 changed files with 6 additions and 0 deletions

View File

@@ -115,6 +115,11 @@ bool Quantity::operator ==(const Quantity& that) const
return (this->_Value == that._Value) && (this->_Unit == that._Unit);
}
bool Quantity::operator !=(const Quantity& that) const
{
return !(*this == that);
}
bool Quantity::operator <(const Quantity& that) const
{
if (this->_Unit != that._Unit)

View File

@@ -130,6 +130,7 @@ public:
Quantity operator /(const Quantity &p) const;
Quantity operator /(double p) const;
bool operator ==(const Quantity&) const;
bool operator !=(const Quantity&) const;
bool operator < (const Quantity&) const;
bool operator > (const Quantity&) const;
bool operator <= (const Quantity&) const;