]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/fix.hxx
Moved random ground cover object management code (userdata.[ch]xx) over
[flightgear.git] / src / Navaids / fix.hxx
index 3804fb4b286ce02c246c6e34f15bd5731eb72581..f21dc144307931be430f03d9b038fb8aad8b254c 100644 (file)
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <istream>
-#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS )
-#  include <iostream.h>
-#elif defined( __BORLANDC__ )
+#elif defined( __BORLANDC__ ) || (__APPLE__)
 #  include <iostream>
 #else
 #  include <istream.h>
 #endif
 
-#if ! defined( SG_HAVE_NATIVE_SGI_COMPILERS )
 SG_USING_STD(istream);
-#endif
 
 #include STL_STRING
 SG_USING_STD(string);
@@ -57,7 +53,7 @@ class FGFix {
 
 public:
 
-    inline FGFix(void) {}
+    inline FGFix(void);
     inline ~FGFix(void) {}
 
     inline string get_ident() const { return ident; }
@@ -68,15 +64,28 @@ public:
 };
 
 
+inline
+FGFix::FGFix()
+  : ident(""),
+    lon(0.0),
+    lat(0.0)
+{
+}
+
+
 inline istream&
 operator >> ( istream& in, FGFix& f )
 {
-    in >> f.ident >> f.lat >> f.lon;
+    in >> f.ident;
+
+    if ( f.ident[0] == '[' )
+        return in >> skipeol;
+
+    in >> f.lat >> f.lon;
 
     // cout << "id = " << f.ident << endl;
 
-    // return in >> skipeol;
-    return in;
+    return in >> skipeol;
 }