From 38fe2d1c4946cd520dbb445c5c0946de0bfa0124 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Fri, 29 Mar 2019 00:10:08 +0000 Subject: [PATCH] Removed null check in CPhysicalQuantity::compareImpl as it was wrong and useless. --- src/blackmisc/pq/physicalquantity.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/blackmisc/pq/physicalquantity.cpp b/src/blackmisc/pq/physicalquantity.cpp index 77bf11f64..764646cdf 100644 --- a/src/blackmisc/pq/physicalquantity.cpp +++ b/src/blackmisc/pq/physicalquantity.cpp @@ -486,14 +486,6 @@ namespace BlackMisc template int CPhysicalQuantity::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; }