fs/io/BufferedReader: add method Reset()

This commit is contained in:
Max Kellermann 2016-08-27 12:09:57 +02:00
parent a07117ea55
commit d15f64ae5d

View File

@ -44,6 +44,16 @@ public:
:reader(_reader), buffer(4096), eof(false),
line_number(0) {}
/**
* Reset the internal state. Should be called after rewinding
* the underlying #Reader.
*/
void Reset() {
buffer.Clear();
eof = false;
line_number = 0;
}
bool Fill(bool need_more);
gcc_pure