potential file metadata may only be in the first line of a file.

This commit is contained in:
Axel Kohlmeyer
2020-06-14 19:59:17 -04:00
parent 8736565977
commit 753e2b00cf

View File

@ -545,9 +545,8 @@ std::string utils::get_potential_file_path(const std::string& path) {
std::string utils::get_potential_date(const std::string & path, const std::string & potential_name) {
TextFileReader reader(path, potential_name);
reader.ignore_comments = false;
char * line = nullptr;
while ((line = reader.next_line())) {
char *line = reader.next_line();
ValueTokenizer values(line);
while (values.has_next()) {
std::string word = values.next_string();
@ -558,7 +557,6 @@ std::string utils::get_potential_date(const std::string & path, const std::strin
}
}
}
}
return "";
}
@ -570,9 +568,8 @@ std::string utils::get_potential_date(const std::string & path, const std::strin
std::string utils::get_potential_units(const std::string & path, const std::string & potential_name) {
TextFileReader reader(path, potential_name);
reader.ignore_comments = false;
char * line = nullptr;
while ((line = reader.next_line())) {
char *line = reader.next_line();
ValueTokenizer values(line);
while (values.has_next()) {
std::string word = values.next_string();
@ -583,7 +580,6 @@ std::string utils::get_potential_units(const std::string & path, const std::stri
}
}
}
}
return "";
}