| 40 | } |
| 41 | |
| 42 | std::string readFirstNonEmptyLine(std::ifstream& file) { |
| 43 | std::string line; |
| 44 | while (std::getline(file, line)) { |
| 45 | const std::string trimmed = trim(line); |
| 46 | if (!trimmed.empty()) { |
| 47 | return trimmed; |
| 48 | } |
| 49 | } |
| 50 | return {}; |
| 51 | } |
| 52 | |
| 53 | bool isNewLatFormat(const std::string& firstNonEmptyLine) { |
| 54 | return firstNonEmptyLine == "format lat" || firstNonEmptyLine == "[meta]" || |