]> git.mxchange.org Git - simgear.git/blobdiff - simgear/metar/MetarStation.cpp
Patch from Erik Hofman:
[simgear.git] / simgear / metar / MetarStation.cpp
index 8115df4826f8077c6d04dd88ed2c919303b9960d..d0ee73868da4ae623d2f81a12636ebfefb01885b 100644 (file)
@@ -8,13 +8,9 @@
 #include "MetarStation.h"
 #include <algorithm>
 
-#include <simgear/misc/fgpath.hxx>
-
-#if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
 SG_USING_STD(ostream);
 SG_USING_STD(cout);
 SG_USING_STD(endl);
-#endif
 
 
 double CMetarStation::decodeDMS( char *b )
@@ -83,7 +79,7 @@ CMetarStation::CMetarStation(
        double ulongitude = decodeDMS( s );
        s = t; t = strchr( s, ';' ); *t = 0; t++;
        double altitude = atoi( s ) * SG_FEET_TO_METER;
-       m_altitude = altitude;
+       m_altitude = (int)altitude;
        s = t; t = strchr( s, ';' ); *t = 0; t++;
        double ualtitude = atoi( s ) * SG_FEET_TO_METER;
        Point3D p( longitude, latitude, altitude+SG_EQUATORIAL_RADIUS_M );
@@ -175,7 +171,7 @@ CMetarStation * CMetarStationDB::find( Point3D locationCart )
 {
     std::map<std::string,CMetarStation*>::iterator itr;
     double bestDist = 99999999;
-    CMetarStation * bestStation;
+    CMetarStation *bestStation = NULL;
     Point3D curLocation = locationCart;
     itr = METAR_Stations.begin(); 
     while(itr != METAR_Stations.end())