summaryrefslogtreecommitdiff
path: root/src/MusicPipe.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-30 18:00:40 +0100
committerMax Kellermann <max@musicpd.org>2018-06-22 23:11:52 +0200
commit54d295c247deb1f543d922eb838d3eff2f7a89ce (patch)
tree1f97982f7a1feb5e70a9ff4cc29d0c08e197cf0c /src/MusicPipe.hxx
parente81b089612833b61c566b482640615e182949ac6 (diff)
MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
Diffstat (limited to 'src/MusicPipe.hxx')
-rw-r--r--src/MusicPipe.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MusicPipe.hxx b/src/MusicPipe.hxx
index fd0471fd4..57ae0dd7c 100644
--- a/src/MusicPipe.hxx
+++ b/src/MusicPipe.hxx
@@ -20,6 +20,7 @@
#ifndef MPD_PIPE_H
#define MPD_PIPE_H
+#include "MusicChunkPtr.hxx"
#include "thread/Mutex.hxx"
#include "Compiler.h"
@@ -29,7 +30,6 @@
#include <assert.h>
-struct MusicChunk;
class MusicBuffer;
/**
@@ -108,7 +108,7 @@ public:
/**
* Removes the first chunk from the head, and returns it.
*/
- MusicChunk *Shift() noexcept;
+ MusicChunkPtr Shift() noexcept;
/**
* Clears the whole pipe and returns the chunks to the buffer.
@@ -118,7 +118,7 @@ public:
/**
* Pushes a chunk to the tail of the pipe.
*/
- void Push(MusicChunk *chunk) noexcept;
+ void Push(MusicChunkPtr chunk) noexcept;
/**
* Returns the number of chunks currently in this pipe.