aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/DynamicFifoBuffer.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-06 17:52:56 +0200
committerMax Kellermann <max@duempel.org>2014-08-06 22:55:59 +0200
commit08fee9a284cc082822392b38574fd2d4b0afb843 (patch)
tree4fb67ce0397d745a81cad04861791674f737a963 /src/util/DynamicFifoBuffer.hxx
parentf89da17827eefdefea56ee871e74a9da46854f4e (diff)
downloadmpd-08fee9a284cc082822392b38574fd2d4b0afb843.tar.gz
mpd-08fee9a284cc082822392b38574fd2d4b0afb843.tar.xz
mpd-08fee9a284cc082822392b38574fd2d4b0afb843.zip
util/ForeignFifoBuffer: add method GetAvailable()
Diffstat (limited to 'src/util/DynamicFifoBuffer.hxx')
-rw-r--r--src/util/DynamicFifoBuffer.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/DynamicFifoBuffer.hxx b/src/util/DynamicFifoBuffer.hxx
index d441b4484..91cbbc4c7 100644
--- a/src/util/DynamicFifoBuffer.hxx
+++ b/src/util/DynamicFifoBuffer.hxx
@@ -54,6 +54,7 @@ public:
using ForeignFifoBuffer<T>::IsEmpty;
using ForeignFifoBuffer<T>::IsFull;
+ using ForeignFifoBuffer<T>::GetAvailable;
using ForeignFifoBuffer<T>::Read;
using ForeignFifoBuffer<T>::Consume;
using ForeignFifoBuffer<T>::Write;
@@ -73,7 +74,7 @@ public:
/* we already have enough space */
return;
- const size_type in_use = Read().size;
+ const size_type in_use = GetAvailable();
const size_type required_capacity = in_use + n;
size_type new_capacity = GetCapacity();
do {