]> git.mxchange.org Git - simgear.git/blobdiff - simgear/metar/MetarStation.cpp
FreeBSD fix: strnstr() is already defined.
[simgear.git] / simgear / metar / MetarStation.cpp
index b13a3aa8a3a0c5cf7e4fc4aaff1b1e51f48d856b..9000ae5ce9e347cece8cff1624a65e017c93c3ba 100644 (file)
@@ -81,7 +81,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 );
@@ -173,7 +173,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())