]> git.mxchange.org Git - simgear.git/commitdiff
Merge branch 'releng/1.9.1' into maint
authorTim Moore <timoore@redhat.com>
Wed, 4 Feb 2009 10:02:30 +0000 (11:02 +0100)
committerTim Moore <timoore@redhat.com>
Wed, 4 Feb 2009 10:02:30 +0000 (11:02 +0100)
simgear/structure/SGBinding.cxx
simgear/timing/sg_time.cxx
simgear/timing/sg_time.hxx

index 0c3f7feb4eb384090366c135b8028594c9c854db..e65b4d2a8bf584a3928f9f06bd1605e7b1f8e17b 100644 (file)
@@ -42,7 +42,6 @@ SGBinding::read(const SGPropertyNode* node, SGPropertyNode* root)
   if (_command_name.empty()) {
     SG_LOG(SG_INPUT, SG_WARN, "No command supplied for binding.");
     _command = 0;
-    return;
   }
 
   _arg = const_cast<SGPropertyNode*>(node);
index fb3f30c81c19ee5283e0737658f058c9a522879d..66f4b16e93da0da6d06c707bdd1932a0ff4f4a63 100644 (file)
@@ -195,9 +195,9 @@ void SGTime::update( double lon_rad, double lat_rad,
 {
     double gst_precise, gst_course;
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
+
     tm * gmt = &m_gmt;
-#endif
+
 
     SG_LOG( SG_EVENT, SG_DEBUG, "Updating time" );
 
@@ -213,11 +213,8 @@ void SGTime::update( double lon_rad, double lat_rad,
            << "  warp = " << warp );
 
     // get GMT break down for current time
-#if defined(_MSC_VER) || defined(__MINGW32__)
+
     memcpy( gmt, gmtime(&cur_time), sizeof(tm) );
-#else
-    gmt = gmtime(&cur_time);
-#endif
     SG_LOG( SG_EVENT, SG_DEBUG, 
            "  Current GMT = " << gmt->tm_mon+1 << "/" 
            << gmt->tm_mday << "/" << (1900 + gmt->tm_year) << " "
@@ -367,12 +364,8 @@ double sgTimeCalcMJD(int mn, double dy, int yr) {
 // since 1900 jan 0.5), mjd.
 double sgTimeCurrentMJD( time_t ct, long int warp ) {
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
     struct tm m_gmt;    // copy of system gmtime(&time_t) structure
     struct tm *gmt = &m_gmt;
-#else
-    struct tm *gmt;
-#endif
 
     // get current Unix calendar time (in seconds)
     // warp += warp_delta;
@@ -387,11 +380,7 @@ double sgTimeCurrentMJD( time_t ct, long int warp ) {
            << "  warp = " << warp );
 
     // get GMT break down for current time
-#if defined(_MSC_VER) || defined(__MINGW32__)
     memcpy( gmt, gmtime(&cur_time), sizeof(tm) );
-#else
-    gmt = gmtime(&cur_time);
-#endif
     SG_LOG( SG_EVENT, SG_DEBUG, 
            "  Current GMT = " << gmt->tm_mon+1 << "/" 
            << gmt->tm_mday << "/" << (1900 + gmt->tm_year) << " "
index 680c161134682a813c5cca24fb9379dce7c227de..ba058f4a864b8f600532655ac34db493f1046452 100644 (file)
@@ -73,11 +73,7 @@ private:
     time_t cur_time;
 
     // Break down of equivalent GMT time
-#if defined(_MSC_VER) || defined(__MINGW32__)
     struct tm m_gmt;    // copy of system gmtime(&time_t) structure
-#else
-    struct tm *gmt;
-#endif
 
     // offset of local time relative to GMT
     time_t local_offset;
@@ -170,11 +166,7 @@ public:
     inline const char * get_zonename() const { return zonename.c_str(); }
 
     /** @return GMT in a "brokent down" tm structure */
-#if defined(_MSC_VER) || defined(__MINGW32__)
     inline struct tm* getGmt()const { return (struct tm *)&m_gmt; };
-#else
-    inline struct tm* getGmt()const { return gmt; };
-#endif
 
     /** @return julian date */
     inline double getJD() const { return jd; };