]> git.mxchange.org Git - simgear.git/blobdiff - simgear/ephemeris/stardata.cxx
Silently ignore previous errors to prevent halting the program on silly errors
[simgear.git] / simgear / ephemeris / stardata.cxx
index 0be378654c6dce1964614c76ed70ff97fa1b1591..13df0cc1c2f9e8d948cbdd300194d7a2f0da7ba5 100644 (file)
@@ -31,7 +31,7 @@
 #include "stardata.hxx"
 
 #if defined (_MSC_VER)
-  SG_USING_STD(getline);
+  using std::getline;
 #endif
 
 // Constructor
@@ -51,13 +51,14 @@ bool SGStarData::load( const SGPath& path ) {
     _stars.clear();
 
     // build the full path name to the stars data base file
-    path.append( "stars" );
-    SG_LOG( SG_ASTRO, SG_INFO, "  Loading stars from " << path.str() );
+    SGPath tmp = path;
+    tmp.append( "stars" );
+    SG_LOG( SG_ASTRO, SG_INFO, "  Loading stars from " << tmp.str() );
 
-    sg_gzifstream in( path.str() );
+    sg_gzifstream in( tmp.str() );
     if ( ! in.is_open() ) {
        SG_LOG( SG_ASTRO, SG_ALERT, "Cannot open star file: "
-               << path.str() );
+               << tmp.str() );
         return false;
     }