TextInputStream: move code to ReadBufferedLine()
Look at the buffer first, before trying to read from the file. This reduces overhead because we don't refill the buffer after every line.
This commit is contained in:
@@ -47,6 +47,9 @@ public:
|
||||
* @return a pointer to the line, or nullptr on end-of-file or error
|
||||
*/
|
||||
char *ReadLine();
|
||||
|
||||
private:
|
||||
char *ReadBufferedLine();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user