Removed null check in CPhysicalQuantity::compareImpl as it was wrong and useless.

This commit is contained in:
Mat Sutcliffe
2019-03-29 00:10:08 +00:00
parent 798a0b8f06
commit 38fe2d1c49

View File

@@ -486,14 +486,6 @@ namespace BlackMisc
template <class MU, class PQ>
int CPhysicalQuantity<MU, PQ>::compareImpl(const PQ &a, const PQ &b)
{
// fetch "null" as we do not know how expensive it is
const bool aIsNull = a.isNull();
const bool bIsNull = b.isNull();
if (aIsNull && bIsNull) { return 0; }
if (aIsNull > bIsNull) { return -1; }
if (aIsNull < bIsNull) { return 1; }
if (a < b) { return -1; }
else if (a > b) { return 1; }
else { return 0; }