diff options
author | Max Kellermann <max@duempel.org> | 2014-08-06 17:52:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-06 22:55:59 +0200 |
commit | 08fee9a284cc082822392b38574fd2d4b0afb843 (patch) | |
tree | 4fb67ce0397d745a81cad04861791674f737a963 /src/util/ForeignFifoBuffer.hxx | |
parent | f89da17827eefdefea56ee871e74a9da46854f4e (diff) | |
download | mpd-08fee9a284cc082822392b38574fd2d4b0afb843.tar.gz mpd-08fee9a284cc082822392b38574fd2d4b0afb843.tar.xz mpd-08fee9a284cc082822392b38574fd2d4b0afb843.zip |
util/ForeignFifoBuffer: add method GetAvailable()
Diffstat (limited to 'src/util/ForeignFifoBuffer.hxx')
-rw-r--r-- | src/util/ForeignFifoBuffer.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/ForeignFifoBuffer.hxx b/src/util/ForeignFifoBuffer.hxx index c119fb6d5..cd6fb6101 100644 --- a/src/util/ForeignFifoBuffer.hxx +++ b/src/util/ForeignFifoBuffer.hxx @@ -171,6 +171,10 @@ public: tail += n; } + constexpr size_type GetAvailable() const { + return tail - head; + } + /** * Return a buffer range which may be read. The buffer pointer is * writable, to allow modifications while parsing. |