Switch to bool return types.
This commit is contained in:
parent
0d53ec0be0
commit
83388f0c38
2 changed files with 11 additions and 11 deletions
|
@ -79,7 +79,7 @@ TGArray::TGArray( const string &file ) {
|
||||||
|
|
||||||
|
|
||||||
// open an Array file
|
// open an Array file
|
||||||
int
|
bool
|
||||||
TGArray::open( const string& file ) {
|
TGArray::open( const string& file ) {
|
||||||
// open input file (or read from stdin)
|
// open input file (or read from stdin)
|
||||||
if ( file == "-" ) {
|
if ( file == "-" ) {
|
||||||
|
@ -87,34 +87,34 @@ TGArray::open( const string& file ) {
|
||||||
// fd = stdin;
|
// fd = stdin;
|
||||||
// fd = gzdopen(STDIN_FILENO, "r");
|
// fd = gzdopen(STDIN_FILENO, "r");
|
||||||
cout << " Not yet ported ..." << endl;
|
cout << " Not yet ported ..." << endl;
|
||||||
return 0;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
in = new sg_gzifstream( file );
|
in = new sg_gzifstream( file );
|
||||||
if ( ! in->is_open() ) {
|
if ( ! in->is_open() ) {
|
||||||
cout << " Cannot open " << file << endl;
|
cout << " Cannot open " << file << endl;
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
cout << " Opening array data file: " << file << endl;
|
cout << " Opening array data file: " << file << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// close an Array file
|
// close an Array file
|
||||||
int
|
bool
|
||||||
TGArray::close() {
|
TGArray::close() {
|
||||||
// the sg_gzifstream doesn't seem to have a close()
|
// the sg_gzifstream doesn't seem to have a close()
|
||||||
|
|
||||||
delete in;
|
delete in;
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// parse Array file, pass in the bucket so we can make up values when
|
// parse Array file, pass in the bucket so we can make up values when
|
||||||
// the file wasn't found.
|
// the file wasn't found.
|
||||||
int
|
bool
|
||||||
TGArray::parse( SGBucket& b ) {
|
TGArray::parse( SGBucket& b ) {
|
||||||
if ( in->is_open() ) {
|
if ( in->is_open() ) {
|
||||||
// file open, parse
|
// file open, parse
|
||||||
|
@ -238,7 +238,7 @@ TGArray::parse( SGBucket& b ) {
|
||||||
cout << " File not open, so using zero'd data" << endl;
|
cout << " File not open, so using zero'd data" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -84,13 +84,13 @@ public:
|
||||||
~TGArray( void );
|
~TGArray( void );
|
||||||
|
|
||||||
// open an Array file (use "-" if input is coming from stdin)
|
// open an Array file (use "-" if input is coming from stdin)
|
||||||
int open ( const string& file );
|
bool open ( const string& file );
|
||||||
|
|
||||||
// close a Array file
|
// close a Array file
|
||||||
int close();
|
bool close();
|
||||||
|
|
||||||
// parse a Array file
|
// parse a Array file
|
||||||
int parse( SGBucket& b );
|
bool parse( SGBucket& b );
|
||||||
|
|
||||||
// Use least squares to fit a simpler data set to dem data.
|
// Use least squares to fit a simpler data set to dem data.
|
||||||
// Return the number of fitted nodes
|
// Return the number of fitted nodes
|
||||||
|
|
Loading…
Reference in a new issue