From: ThorstenB Date: Mon, 19 Nov 2012 22:42:51 +0000 (+0100) Subject: Keep (deprecated) SGTime::update method for a while X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ff65b82671fc32ab96f85969d2790340b8d12877;p=simgear.git Keep (deprecated) SGTime::update method for a while allowing dependent projects to adapt. --- diff --git a/simgear/compiler.h b/simgear/compiler.h index e94c7ee4..5a1cd477 100644 --- a/simgear/compiler.h +++ b/simgear/compiler.h @@ -184,6 +184,12 @@ inline int (isnan)(double r) { return !(r <= 0 || r >= 0); } # define SG_UNIX #endif +#if defined( __GNUC__ ) +# define DEPRECATED __attribute__ ((deprecated)) +#else +# define DEPRECATED +#endif + // // No user modifiable definitions beyond here. // diff --git a/simgear/timing/sg_time.cxx b/simgear/timing/sg_time.cxx index e3b403a0..9c7cb326 100644 --- a/simgear/timing/sg_time.cxx +++ b/simgear/timing/sg_time.cxx @@ -182,6 +182,12 @@ static double sidereal_course( time_t cur_time, const struct tm *gmt, double lng return lstTmp; } +/** Deprecated method. To be removed after the next release... */ +void SGTime::update( double lon_rad, double lat_rad, time_t ct, long int warp ) +{ + const SGGeod& location = SGGeod::fromRad(lon_rad, lat_rad); + update(location, ct, warp); +} // Update the time related variables void SGTime::update( const SGGeod& location, time_t ct, long int warp ) diff --git a/simgear/timing/sg_time.hxx b/simgear/timing/sg_time.hxx index 78d04863..d59ee249 100644 --- a/simgear/timing/sg_time.hxx +++ b/simgear/timing/sg_time.hxx @@ -148,6 +148,9 @@ public: * allows us to advance or rewind "time" if we choose to. */ void update( const SGGeod& location, time_t ct, long int warp ); + /** Deprecated method. To be removed after the next release... */ + void update( double lon_rad, double lat_rad, time_t ct, long int warp ) DEPRECATED; + /** * Given lon/lat, update timezone information and local_offset * The updateLocal() method is intended to be called less