diff options
author | Max Kellermann <max@musicpd.org> | 2019-08-02 22:49:50 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-08-02 22:49:55 +0200 |
commit | 52bee8f81fe749c37030ee3095471d8c2f0d8ab4 (patch) | |
tree | 217e2327e17e05ba6b81e00148b37b953cd55b13 /src | |
parent | adc25e648fe5237694d237fd781d4705bf01bbd4 (diff) |
util/StaticFifoBuffer: add GetAvailable()
Diffstat (limited to 'src')
-rw-r--r-- | src/util/StaticFifoBuffer.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/StaticFifoBuffer.hxx b/src/util/StaticFifoBuffer.hxx index 3598d7246..615f92e3f 100644 --- a/src/util/StaticFifoBuffer.hxx +++ b/src/util/StaticFifoBuffer.hxx @@ -111,6 +111,10 @@ public: tail += n; } + constexpr size_type GetAvailable() const noexcept { + return tail - head; + } + /** * Return a buffer range which may be read. The buffer pointer is * writable, to allow modifications while parsing. |