fs/io/BufferedReader: add method Reset()
This commit is contained in:
parent
a07117ea55
commit
d15f64ae5d
@ -44,6 +44,16 @@ public:
|
|||||||
:reader(_reader), buffer(4096), eof(false),
|
:reader(_reader), buffer(4096), eof(false),
|
||||||
line_number(0) {}
|
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);
|
bool Fill(bool need_more);
|
||||||
|
|
||||||
gcc_pure
|
gcc_pure
|
||||||
|
Loading…
Reference in New Issue
Block a user