Using friend function comparison and arithmetic operators, for parameter symmetry.

This commit is contained in:
Mat Sutcliffe
2019-02-27 22:27:34 +00:00
parent 1089adf18d
commit 798a0b8f06
5 changed files with 27 additions and 67 deletions

View File

@@ -16,17 +16,6 @@ namespace BlackMisc
{
namespace PhysicalQuantities
{
bool CMeasurementUnit::operator ==(const CMeasurementUnit &other) const
{
if (this == &other) return true;
return m_data->m_name == other.m_data->m_name;
}
bool CMeasurementUnit::operator !=(const CMeasurementUnit &other) const
{
return !(other == *this);
}
double CMeasurementUnit::convertFrom(double value, const CMeasurementUnit &unit) const
{
if (this->isNull() || unit.isNull()) return 0;