Codechange: let ReadLine return a string instead of passing a buffer

This commit is contained in:
Rubidium
2023-06-09 18:10:24 +02:00
committed by rubidium42
parent 81f957b9f8
commit 6d597879d0
4 changed files with 17 additions and 21 deletions

View File

@@ -67,11 +67,9 @@ struct StringReader {
/**
* Read a single line from the source of strings.
* @param buffer The buffer to read the data in to.
* @param last The last element in the buffer.
* @return The buffer, or nullptr if at the end of the file.
* @return The line, or std::nullopt if at the end of the file.
*/
virtual char *ReadLine(char *buffer, const char *last) = 0;
virtual std::optional<std::string> ReadLine() = 0;
/**
* Handle the pragma of the file.