util/StaticFifoBuffer: add GetAvailable()

This commit is contained in:
Max Kellermann 2019-08-02 22:49:50 +02:00
parent adc25e648f
commit 52bee8f81f

View File

@ -111,6 +111,10 @@ public:
tail += n; tail += n;
} }
constexpr size_type GetAvailable() const noexcept {
return tail - head;
}
/** /**
* Return a buffer range which may be read. The buffer pointer is * Return a buffer range which may be read. The buffer pointer is
* writable, to allow modifications while parsing. * writable, to allow modifications while parsing.