aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/PeakBuffer.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-15 22:39:30 +0100
committerMax Kellermann <max@duempel.org>2013-12-15 23:07:08 +0100
commit1f523be72decf652dfe64ac6885770d8e86de0c7 (patch)
tree530d9367773757f1f3b826a7afd1d4daa5ffd9b6 /src/util/PeakBuffer.hxx
parentf2a20a0a800e879b0e52681b7f9b8829047c55a7 (diff)
downloadmpd-1f523be72decf652dfe64ac6885770d8e86de0c7.tar.gz
mpd-1f523be72decf652dfe64ac6885770d8e86de0c7.tar.xz
mpd-1f523be72decf652dfe64ac6885770d8e86de0c7.zip
util/PeakBuffer: return ConstBuffer<void>
Diffstat (limited to 'src/util/PeakBuffer.hxx')
-rw-r--r--src/util/PeakBuffer.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/PeakBuffer.hxx b/src/util/PeakBuffer.hxx
index a3f385e3e..0e58e80b8 100644
--- a/src/util/PeakBuffer.hxx
+++ b/src/util/PeakBuffer.hxx
@@ -20,11 +20,13 @@
#ifndef MPD_PEAK_BUFFER_HXX
#define MPD_PEAK_BUFFER_HXX
+#include "ConstBuffer.hxx"
#include "Compiler.h"
#include <stddef.h>
struct fifo_buffer;
+template<typename T> struct ConstBuffer;
/**
* A FIFO-like buffer that will allocate more memory on demand to
@@ -57,7 +59,9 @@ public:
gcc_pure
bool IsEmpty() const;
- const void *Read(size_t *length_r) const;
+ gcc_pure
+ ConstBuffer<void> Read() const;
+
void Consume(size_t length);
bool Append(const void *data, size_t length);