Skip to content

Commit 22a6412

Browse files
committed
Updated implementation of to not return blank line, but last known good line
1 parent 5b34335 commit 22a6412

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/utils.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,10 @@ std::istream& StreamHandler::get_line(std::istream& stream, std::string& line) {
1616
}
1717

1818
std::istream& StreamHandler::get_next_non_blank_line(std::istream& stream, std::string& line) {
19-
20-
// NOTE:
21-
// The test expects this function to return a blank string if it has reached the end.
22-
// IMO this behaviour is incorrect and it should always return the last valid string.
23-
// - S. Cahill.
24-
2519
for (;;) {
2620
Utils::StreamHandler::get_line(stream, line); // must strip trailing '\r'
2721

2822
if (!stream) { // EOF or error after attempt to read
29-
line.clear(); // test expects "" at/after EOF; remove me if the behaviour is to be fixed.
3023
return stream;
3124
}
3225

0 commit comments

Comments
 (0)