Reduce compiler.h to almost nothing (but it's worth keeping around I think, for
the MSVC and MipsPro warning stuff). As a result of this patch, simgear/sg_traits.h can be deleted. So can SGCMath.h, but I'll do that separately. There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X), but I want to keep that separate from everything else. (There's another mechnica l change, replacing <math.h> with <cmath> and so on *everywhere*, but one step a t a time)
This commit is contained in:
@@ -38,8 +38,6 @@
|
||||
#include <math.h>
|
||||
#include <vector>
|
||||
|
||||
SG_USING_NAMESPACE(std);
|
||||
|
||||
#include <simgear/constants.h>
|
||||
|
||||
class SGGeoCoord
|
||||
@@ -65,9 +63,9 @@ public:
|
||||
virtual const char * getDescription() {return 0;};
|
||||
};
|
||||
|
||||
typedef vector<SGGeoCoord*> SGGeoCoordVector;
|
||||
typedef vector<SGGeoCoord*>::iterator SGGeoCoordVectorIterator;
|
||||
typedef vector<SGGeoCoord*>::const_iterator SGGeoCoordVectorConstIterator;
|
||||
typedef std::vector<SGGeoCoord*> SGGeoCoordVector;
|
||||
typedef std::vector<SGGeoCoord*>::iterator SGGeoCoordVectorIterator;
|
||||
typedef std::vector<SGGeoCoord*>::const_iterator SGGeoCoordVectorConstIterator;
|
||||
|
||||
/************************************************************************
|
||||
* SGGeoCoordContainer is a simple container class, that stores objects
|
||||
|
||||
@@ -29,15 +29,9 @@
|
||||
|
||||
#include <errno.h> // for errno
|
||||
|
||||
#ifdef SG_HAVE_STD_INCLUDES
|
||||
# include <cstdio>
|
||||
# include <cstdlib>
|
||||
# include <ctime>
|
||||
#else
|
||||
# include <math.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -35,11 +35,7 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#ifdef SG_HAVE_STD_INCLUDES
|
||||
# include <ctime>
|
||||
#else
|
||||
# include <time.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
#include <simgear/timing/timezone.h>
|
||||
|
||||
@@ -71,7 +67,7 @@ private:
|
||||
SGTimeZoneContainer* tzContainer;
|
||||
|
||||
// Points to the current local timezone name;
|
||||
string zonename;
|
||||
std::string zonename;
|
||||
|
||||
// Unix "calendar" time in seconds
|
||||
time_t cur_time;
|
||||
@@ -104,7 +100,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 +124,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 +161,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; };
|
||||
|
||||
@@ -34,11 +34,7 @@
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#ifdef SG_HAVE_STD_INCLUDES
|
||||
# include <ctime>
|
||||
#else
|
||||
# include <time.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h> // for ftime() and struct timeb
|
||||
|
||||
@@ -44,8 +44,8 @@ class SGTimeZone : public SGGeoCoord
|
||||
|
||||
private:
|
||||
|
||||
string countryCode;
|
||||
string descriptor;
|
||||
std::string countryCode;
|
||||
std::string descriptor;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user