]> git.mxchange.org Git - flightgear.git/blobdiff - Airports/simple.cxx
Converted to new logstream debugging facility. This allows release
[flightgear.git] / Airports / simple.cxx
index 55578be67812f9f2452bb72110b86b5d52886307..bbe93f4c521b7bcace07bd134b842e2ba11ff762 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <string>
 
-#include <Debug/fg_debug.h>
+#include <Debug/logstream.hxx>
 #include <Main/options.hxx>
 #include <Misc/fgstream.hxx>
 
@@ -52,9 +52,10 @@ int fgAIRPORTS::load( const string& file ) {
     airports.erase( airports.begin(), airports.end() );
 
     fg_gzifstream in( path );
-    if ( !in )
-       fgPrintf( FG_GENERAL, FG_EXIT, "Cannot open file: %s\n", 
-                 path.c_str());
+    if ( !in ) {
+       FG_LOG( FG_GENERAL, FG_ALERT, "Cannot open file: " << path );
+       exit(-1);
+    }
 
     /*
     // We can use the STL copy algorithm because the input
@@ -65,12 +66,12 @@ int fgAIRPORTS::load( const string& file ) {
     */
 
     // read in each line of the file
-    in.eat_comments();
+    in >> skipcomment;
     while ( ! in.eof() )
     {
-       in.stream() >> a;
+       in >> a;
        airports.insert(a);
-       in.eat_comments();
+       in >> skipcomment;
     }
 
     return 1;
@@ -109,6 +110,14 @@ fgAIRPORTS::~fgAIRPORTS( void ) {
 
 
 // $Log$
+// Revision 1.9  1998/11/06 21:17:34  curt
+// Converted to new logstream debugging facility.  This allows release
+// builds with no messages at all (and no performance impact) by using
+// the -DFG_NDEBUG flag.
+//
+// Revision 1.8  1998/11/06 14:47:01  curt
+// Changes to track Bernie's updates to fgstream.
+//
 // Revision 1.7  1998/09/08 21:38:41  curt
 // Changes by Bernie Bright.
 //