]> git.mxchange.org Git - flightgear.git/commitdiff
More sensible handling of the case where no dem file for this tile exists
authorcurt <curt>
Sat, 27 Mar 1999 14:05:10 +0000 (14:05 +0000)
committercurt <curt>
Sat, 27 Mar 1999 14:05:10 +0000 (14:05 +0000)
(or has been generated).

Array/array.cxx

index d7b38c22e2688f397aca6ce25df931f6c0d4251f..af1e32f7d160c817aeb9d8e8ac9f59c7b18be9ff 100644 (file)
@@ -85,7 +85,7 @@ FGArray::open( const string& file ) {
        return 0;
     } else {
        in = new fg_gzifstream( file );
-       if ( !(*in) ) {
+       if ( ! in->is_open() ) {
            cout << "  Cannot open " << file << endl;
            return 0;
        }
@@ -341,7 +341,7 @@ double FGArray::interpolate_altitude( double lon, double lat ) const {
         (yindex < 0) || (yindex + 1 >= rows) ) {
        cout << "WARNING: Attempt to interpolate value outside of array!!!" 
             << endl;
-       return(-9999);
+       return 0;
     }
 
     dx = xlocal - xindex;
@@ -539,6 +539,10 @@ FGArray::~FGArray( void ) {
 
 
 // $Log$
+// Revision 1.7  1999/03/27 14:05:10  curt
+// More sensible handling of the case where no dem file for this tile exists
+// (or has been generated).
+//
 // Revision 1.6  1999/03/27 05:20:13  curt
 // Handle corner nodes separately from the rest of the fitted nodes.
 // Fixed some "const" related warnings.