From c6f97e5413c373a32302463e90f19327e094c586 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 27 Mar 1999 14:05:10 +0000 Subject: [PATCH] More sensible handling of the case where no dem file for this tile exists (or has been generated). --- Array/array.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Array/array.cxx b/Array/array.cxx index d7b38c22e..af1e32f7d 100644 --- a/Array/array.cxx +++ b/Array/array.cxx @@ -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.