Genapts850: Add a version 810 check. This version is unsupported.
This commit is contained in:
parent
4f29c32c18
commit
d42b7269cf
2 changed files with 13 additions and 2 deletions
|
@ -47,7 +47,7 @@ double tgAverageElevation( const std::string &root, const string_list elev_src,
|
|||
std::vector<SGGeod> points = points_source;
|
||||
|
||||
// just bail if no work to do
|
||||
if ( points.size() == 0 ) {
|
||||
if ( points.empty() ) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
@ -126,4 +126,4 @@ double tgAverageElevation( const std::string &root, const string_list elev_src,
|
|||
TG_LOG(SG_GENERAL, SG_DEBUG, "Average surface height of point list = " << average);
|
||||
|
||||
return average;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -308,6 +308,17 @@ int main(int argc, char **argv)
|
|||
exit(-1);
|
||||
}
|
||||
|
||||
// try to figure out which apt.dat version we are reading and bail if version is unsupported
|
||||
in >> skipeol;
|
||||
char line[20];
|
||||
in.getline(line, 20);
|
||||
in.close();
|
||||
int code = atoi(line);
|
||||
if (code == 810) {
|
||||
TG_LOG( SG_GENERAL, SG_ALERT, "ERROR: This version of genapts does not support version 810 apt.dat files." );
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Create the scheduler
|
||||
Scheduler* scheduler = new Scheduler(input_file, work_dir, elev_src);
|
||||
|
||||
|
|
Loading…
Reference in a new issue