mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Removed null check in CPhysicalQuantity::compareImpl as it was wrong and useless.
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user