input/InputStream: use C++11 initializers
This commit is contained in:
parent
078839c711
commit
82a79565de
@ -22,8 +22,7 @@
|
||||
#include "tag/Tag.hxx"
|
||||
|
||||
IcyInputStream::IcyInputStream(InputStream *_input)
|
||||
:ProxyInputStream(_input),
|
||||
override_offset(0)
|
||||
:ProxyInputStream(_input)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ class IcyInputStream final : public ProxyInputStream {
|
||||
*/
|
||||
std::unique_ptr<Tag> icy_tag;
|
||||
|
||||
offset_type override_offset;
|
||||
offset_type override_offset = 0;
|
||||
|
||||
public:
|
||||
IcyInputStream(InputStream *_input);
|
||||
|
@ -70,24 +70,24 @@ protected:
|
||||
* indicates whether the stream is ready for reading and
|
||||
* whether the other attributes in this struct are valid
|
||||
*/
|
||||
bool ready;
|
||||
bool ready = false;
|
||||
|
||||
/**
|
||||
* if true, then the stream is fully seekable
|
||||
*/
|
||||
bool seekable;
|
||||
bool seekable = false;
|
||||
|
||||
static constexpr offset_type UNKNOWN_SIZE = -1;
|
||||
|
||||
/**
|
||||
* the size of the resource, or #UNKNOWN_SIZE if unknown
|
||||
*/
|
||||
offset_type size;
|
||||
offset_type size = UNKNOWN_SIZE;
|
||||
|
||||
/**
|
||||
* the current offset within the stream
|
||||
*/
|
||||
offset_type offset;
|
||||
offset_type offset = 0;
|
||||
|
||||
private:
|
||||
/**
|
||||
@ -98,9 +98,7 @@ private:
|
||||
public:
|
||||
InputStream(const char *_uri, Mutex &_mutex, Cond &_cond)
|
||||
:uri(_uri),
|
||||
mutex(_mutex), cond(_cond),
|
||||
ready(false), seekable(false),
|
||||
size(UNKNOWN_SIZE), offset(0) {
|
||||
mutex(_mutex), cond(_cond) {
|
||||
assert(_uri != nullptr);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ class RewindInputStream final : public ProxyInputStream {
|
||||
/**
|
||||
* The write/append position within the buffer.
|
||||
*/
|
||||
size_t tail;
|
||||
size_t tail = 0;
|
||||
|
||||
/**
|
||||
* The size of this buffer is the maximum number of bytes
|
||||
@ -48,8 +48,7 @@ class RewindInputStream final : public ProxyInputStream {
|
||||
|
||||
public:
|
||||
RewindInputStream(InputStream *_input)
|
||||
:ProxyInputStream(_input),
|
||||
tail(0) {
|
||||
:ProxyInputStream(_input) {
|
||||
}
|
||||
|
||||
/* virtual methods from InputStream */
|
||||
|
Loading…
Reference in New Issue
Block a user