summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-23 18:04:23 +0100
committerMax Kellermann <max@musicpd.org>2016-11-23 18:04:23 +0100
commit051cdc96706f57c6b7416305bd9b9cef2a54a036 (patch)
treee7ebd709f69e4e9f4bef40dbc203cdba8a8f7e37 /src
parent4de5c216ff62136f4c721352f83589d42edf71c7 (diff)
MusicPipe: use C++11 initializers
Diffstat (limited to 'src')
-rw-r--r--src/MusicPipe.hxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/MusicPipe.hxx b/src/MusicPipe.hxx
index f85cf0be0..07f69f3ad 100644
--- a/src/MusicPipe.hxx
+++ b/src/MusicPipe.hxx
@@ -38,31 +38,26 @@ class MusicBuffer;
*/
class MusicPipe {
/** the first chunk */
- MusicChunk *head;
+ MusicChunk *head = nullptr;
/** a pointer to the tail of the chunk */
- MusicChunk **tail_r;
+ MusicChunk **tail_r = &head;
/** the current number of chunks */
- unsigned size;
+ unsigned size = 0;
/** a mutex which protects #head and #tail_r */
mutable Mutex mutex;
#ifndef NDEBUG
- AudioFormat audio_format;
+ AudioFormat audio_format = AudioFormat::Undefined();
#endif
public:
/**
* Creates a new #MusicPipe object. It is empty.
*/
- MusicPipe()
- :head(nullptr), tail_r(&head), size(0) {
-#ifndef NDEBUG
- audio_format.Clear();
-#endif
- }
+ MusicPipe() = default;
/**
* Frees the object. It must be empty now.