MusicPipe: use C++11 initializers
This commit is contained in:
parent
4de5c216ff
commit
051cdc9670
@ -38,31 +38,26 @@ class MusicBuffer;
|
|||||||
*/
|
*/
|
||||||
class MusicPipe {
|
class MusicPipe {
|
||||||
/** the first chunk */
|
/** the first chunk */
|
||||||
MusicChunk *head;
|
MusicChunk *head = nullptr;
|
||||||
|
|
||||||
/** a pointer to the tail of the chunk */
|
/** a pointer to the tail of the chunk */
|
||||||
MusicChunk **tail_r;
|
MusicChunk **tail_r = &head;
|
||||||
|
|
||||||
/** the current number of chunks */
|
/** the current number of chunks */
|
||||||
unsigned size;
|
unsigned size = 0;
|
||||||
|
|
||||||
/** a mutex which protects #head and #tail_r */
|
/** a mutex which protects #head and #tail_r */
|
||||||
mutable Mutex mutex;
|
mutable Mutex mutex;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
AudioFormat audio_format;
|
AudioFormat audio_format = AudioFormat::Undefined();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Creates a new #MusicPipe object. It is empty.
|
* Creates a new #MusicPipe object. It is empty.
|
||||||
*/
|
*/
|
||||||
MusicPipe()
|
MusicPipe() = default;
|
||||||
:head(nullptr), tail_r(&head), size(0) {
|
|
||||||
#ifndef NDEBUG
|
|
||||||
audio_format.Clear();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frees the object. It must be empty now.
|
* Frees the object. It must be empty now.
|
||||||
|
Loading…
Reference in New Issue
Block a user