1
0

feature: parse coordinates, create the number list

This commit is contained in:
2025-11-10 00:52:04 +02:00
parent adeeae3aff
commit 2747fdf9ca
6 changed files with 368 additions and 340 deletions

View File

@@ -104,20 +104,9 @@ namespace wavefront {
return max_length;
}();
while (!input.eof()) {
std::string line;
while (std::getline(input, line)) {
++result.total_lines;
input.getline(buffer.data(), buffer.size());
auto line_size = input.gcount();
if (input.fail() && line_size == buffer.size()) [[unlikely]] {
throw scan_error(std::format(
"[{}]: {}",
result.total_lines,
"Line too long"
));
}
std::string_view line(buffer.data(), line_size);
if (line.empty() || line[0] == '#' || trim(line).empty()) [[unlikely]] {
continue;