From 87169febf80c51a4798d75cf399f3ff75c4de348 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 14 Jun 2010 10:23:06 +0100 Subject: [PATCH] Const-ify some ephemeris accessors, so they can be tied. --- simgear/ephemeris/celestialBody.hxx | 8 ++++---- simgear/ephemeris/star.hxx | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/simgear/ephemeris/celestialBody.hxx b/simgear/ephemeris/celestialBody.hxx index 6572a45c..e555deef 100644 --- a/simgear/ephemeris/celestialBody.hxx +++ b/simgear/ephemeris/celestialBody.hxx @@ -81,8 +81,8 @@ public: double getRightAscension(); double getDeclination(); double getMagnitude(); - double getLon(); - double getLat(); + double getLon() const; + double getLat() const; void updatePosition(double mjd, Star *ourSun); }; @@ -90,12 +90,12 @@ inline double CelestialBody::getRightAscension() { return rightAscension; } inline double CelestialBody::getDeclination() { return declination; } inline double CelestialBody::getMagnitude() { return magnitude; } -inline double CelestialBody::getLon() +inline double CelestialBody::getLon() const { return lonEcl; } -inline double CelestialBody::getLat() +inline double CelestialBody::getLat() const { return latEcl; } diff --git a/simgear/ephemeris/star.hxx b/simgear/ephemeris/star.hxx index 781cfcd6..838cbce7 100644 --- a/simgear/ephemeris/star.hxx +++ b/simgear/ephemeris/star.hxx @@ -43,47 +43,47 @@ public: Star (); ~Star(); void updatePosition(double mjd); - double getM(); - double getw(); - double getxs(); - double getys(); - double getye(); - double getze(); - double getDistance(); + double getM() const; + double getw() const; + double getxs() const; + double getys() const; + double getye() const; + double getze() const; + double getDistance() const; }; -inline double Star::getM() +inline double Star::getM() const { return M; } -inline double Star::getw() +inline double Star::getw() const { return w; } -inline double Star::getxs() +inline double Star::getxs() const { return xs; } -inline double Star::getys() +inline double Star::getys() const { return ys; } -inline double Star::getye() +inline double Star::getye() const { return ye; } -inline double Star::getze() +inline double Star::getze() const { return ze; } -inline double Star::getDistance() +inline double Star::getDistance() const { return distance; } -- 2.39.5