From 8844774fbe39b930417795620aea35598662095c Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Mon, 16 Sep 2013 23:12:41 +0100 Subject: [PATCH] fixed bug when compiling with MinGW: CPhysicalQuantity::operator== used the wrong abs() so it was only comparing integers --- src/blackmisc/pqphysicalquantity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackmisc/pqphysicalquantity.cpp b/src/blackmisc/pqphysicalquantity.cpp index b83c3ce29..9d2105484 100644 --- a/src/blackmisc/pqphysicalquantity.cpp +++ b/src/blackmisc/pqphysicalquantity.cpp @@ -24,7 +24,7 @@ template CPhysicalQuantity::CPhysicalQuantity(doubl template bool CPhysicalQuantity::operator ==(const CPhysicalQuantity &other) const { if (this == &other) return true; - double diff = abs(this->m_value - other.value(this->m_unit)); + double diff = std::abs(this->m_value - other.value(this->m_unit)); return diff <= this->m_unit.getEpsilon(); }