mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
Using friend function comparison and arithmetic operators, for parameter symmetry.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user