]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.cxx
Set the format default to float instead of int.
[flightgear.git] / src / Airports / simple.cxx
index a0fd2aecffb0e6eb6ddd6530901ee66b3a0daf97..cfbb61ac24092b841883d75331581a575aa9d343 100644 (file)
@@ -50,9 +50,12 @@ operator >> ( istream& in, FGAirport& a )
     in >> junk >> a.id >> a.latitude >> a.longitude >> a.elevation
        >> a.code;
 
-    char name[256];             // should never be longer than this, right? :-)
-    in.getline( name, 256 );
-    a.name = name;
+    getline( in,a.name );
+
+    // Remove the space before the name
+    if ( a.name.substr(0,1) == " " ) {
+        a.name = a.name.erase(0,1);
+    }
 
     a.has_metar = false;
 
@@ -119,7 +122,6 @@ FGAirportList::FGAirportList( const string &airport_file,
 
 // search for the specified id
 FGAirport FGAirportList::search( const string& id) {
-    
     return airports_by_id[id];
 }