]> git.mxchange.org Git - simgear.git/blobdiff - simgear/timing/sg_time.hxx
Merge branch 'next' of git://gitorious.org/fg/simgear into next
[simgear.git] / simgear / timing / sg_time.hxx
index 0ec0138b8a7ae369e45ef107a83583a6b916083e..ba058f4a864b8f600532655ac34db493f1046452 100644 (file)
 
 #include <simgear/compiler.h>
 
-#ifdef SG_HAVE_STD_INCLUDES
-#  include <ctime>
-#else
-#  include <time.h>
-#endif
+#include <ctime>
 
 #include <simgear/timing/timezone.h>
 
@@ -71,17 +67,13 @@ private:
     SGTimeZoneContainer* tzContainer;
 
     // Points to the current local timezone name;
-    string zonename;
+    std::string zonename;
 
     // Unix "calendar" time in seconds
     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;
@@ -104,7 +96,7 @@ private:
     double gst_diff;
 
     /** init common constructor code */
-    void init( double lon_rad, double lat_rad, const string& root,
+    void init( double lon_rad, double lat_rad, const std::string& root,
                time_t init_time );
 
 public:
@@ -128,14 +120,14 @@ public:
      * @param root root path point to data file location (timezone, etc.)
      * @param init_time provide an initialization time, 0 means use
               current clock time */
-    SGTime( double lon_rad, double lat_rad, const string& root,
+    SGTime( double lon_rad, double lat_rad, const std::string& root,
             time_t init_time );
 
     /**
      * Create an instance given a data file path.
      * @param root root path point to data file location (timezone, etc.)
      */
-    SGTime( const string& root );
+    SGTime( const std::string& root );
 
     /** Destructor */
     ~SGTime();
@@ -165,7 +157,7 @@ public:
      * @param lon_rad current longitude (radians)
      * @param lat_rad current latitude (radians)
      * @param root base path containing time zone directory */
-    void updateLocal( double lon_rad, double lat_rad, const string& root );
+    void updateLocal( double lon_rad, double lat_rad, const std::string& root );
 
     /** @return current system/unix time in seconds */
     inline time_t get_cur_time() const { return cur_time; };
@@ -174,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; };