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:
Max Kellermann
2014-08-07 12:41:39 +02:00
parent 59d38f876a
commit 36ff991960
2 changed files with 46 additions and 35 deletions

View File

@@ -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