WS30: Reduce log spam

Previously blank lines in the various .txt LIST files
created spurious error logging.  This commit does some
simple length checking and ignore blank lines rather than
complaining (and then ignoring).
This commit is contained in:
Stuart Buchanan 2021-05-23 21:25:16 +01:00
parent 0b6678f745
commit e91c06223a
3 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,8 @@ AreaFeatureBin::AreaFeatureBin(const SGPath& absoluteFileName, const std::string
std::string line; std::string line;
std::getline(stream, line); std::getline(stream, line);
if (line.length() == 0) continue;
// strip comments // strip comments
std::string::size_type hash_pos = line.find('#'); std::string::size_type hash_pos = line.find('#');
if (hash_pos != std::string::npos) if (hash_pos != std::string::npos)

View File

@ -62,6 +62,8 @@ CoastlineBin::CoastlineBin(const SGPath& absoluteFileName)
if (hash_pos != std::string::npos) if (hash_pos != std::string::npos)
line.resize(hash_pos); line.resize(hash_pos);
if (line.length() == 0) continue;
// and process further // and process further
std::stringstream in(line); std::stringstream in(line);

View File

@ -58,6 +58,8 @@ LineFeatureBin::LineFeatureBin(const SGPath& absoluteFileName, const std::string
std::string line; std::string line;
std::getline(stream, line); std::getline(stream, line);
if (line.length() == 0) continue;
// strip comments // strip comments
std::string::size_type hash_pos = line.find('#'); std::string::size_type hash_pos = line.find('#');
if (hash_pos != std::string::npos) if (hash_pos != std::string::npos)