diff options
author | Max Kellermann <max@duempel.org> | 2014-08-07 12:41:39 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-07 16:08:02 +0200 |
commit | 36ff991960f4d298a97cee3f8f0ffcaa30686466 (patch) | |
tree | 005d598b9157c31ff6e27f3d217405f9fa8cc708 /src/input/TextInputStream.hxx | |
parent | 59d38f876a22ef520c6b897a356e8fb8677481aa (diff) | |
download | mpd-36ff991960f4d298a97cee3f8f0ffcaa30686466.tar.gz mpd-36ff991960f4d298a97cee3f8f0ffcaa30686466.tar.xz mpd-36ff991960f4d298a97cee3f8f0ffcaa30686466.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/input/TextInputStream.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input/TextInputStream.hxx b/src/input/TextInputStream.hxx index 6f39d22cf..ce1eaddff 100644 --- a/src/input/TextInputStream.hxx +++ b/src/input/TextInputStream.hxx @@ -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 |