From 38f522b0a4312ef90e3dc68ab12e9df78fa39a17 Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Tue, 14 Feb 2017 20:51:24 +0000 Subject: [PATCH] Remove equality checks for Coord* --- libsgp4/CoordGeodetic.h | 33 --------------------------------- libsgp4/CoordTopocentric.h | 34 ---------------------------------- 2 files changed, 67 deletions(-) diff --git a/libsgp4/CoordGeodetic.h b/libsgp4/CoordGeodetic.h index 689c000..af7a15d 100644 --- a/libsgp4/CoordGeodetic.h +++ b/libsgp4/CoordGeodetic.h @@ -94,26 +94,6 @@ public: return *this; } - /** - * Equality operator - * @param[in] geo the object to compare with - * @returns whether the object is equal - */ - bool operator==(const CoordGeodetic& geo) const - { - return IsEqual(geo); - } - - /** - * Inequality operator - * @param[in] geo the object to compare with - * @returns whether the object is not equal - */ - bool operator!=(const CoordGeodetic& geo) const - { - return !IsEqual(geo); - } - /** * Dump this object to a string * @returns string @@ -134,19 +114,6 @@ public: double longitude; /** altitude in kilometers */ double altitude; - -private: - bool IsEqual(const CoordGeodetic& geo) const - { - bool equal = false; - if (latitude == geo.latitude && - longitude == geo.longitude && - altitude == geo.altitude) - { - equal = false; - } - return equal; - } }; /** diff --git a/libsgp4/CoordTopocentric.h b/libsgp4/CoordTopocentric.h index 8ede642..f9fb798 100644 --- a/libsgp4/CoordTopocentric.h +++ b/libsgp4/CoordTopocentric.h @@ -92,26 +92,6 @@ public: return *this; } - /** - * Equality operator - * @param[in] topo value to check - * @returns whether the object is equal - */ - bool operator==(const CoordTopocentric& topo) const - { - return IsEqual(topo); - } - - /** - * Inequality operator - * @param[in] topo the object to compare with - * @returns whether the object is not equal - */ - bool operator !=(const CoordTopocentric& topo) const - { - return !IsEqual(topo); - } - /** * Dump this object to a string * @returns string @@ -135,20 +115,6 @@ public: double range; /** range rate in kilometers per second */ double range_rate; - -private: - bool IsEqual(const CoordTopocentric& topo) const - { - bool equal = false; - if (azimuth == topo.azimuth && - elevation == topo.elevation && - range == topo.range && - range_rate == topo.range_rate) - { - equal = true; - } - return equal; - } };