input/async: use C++11 initializers

This commit is contained in:
Max Kellermann 2017-09-19 19:54:07 +02:00
parent 56a9bf459d
commit 99a447dff5
2 changed files with 5 additions and 9 deletions

View File

@ -38,11 +38,7 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url,
deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)), deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)),
allocation(_buffer_size), allocation(_buffer_size),
buffer((uint8_t *)allocation.get(), _buffer_size), buffer((uint8_t *)allocation.get(), _buffer_size),
resume_at(_resume_at), resume_at(_resume_at) {}
open(true),
paused(false),
seek_state(SeekState::NONE),
tag(nullptr) {}
AsyncInputStream::~AsyncInputStream() AsyncInputStream::~AsyncInputStream()
{ {

View File

@ -46,22 +46,22 @@ class AsyncInputStream : public InputStream {
CircularBuffer<uint8_t> buffer; CircularBuffer<uint8_t> buffer;
const size_t resume_at; const size_t resume_at;
bool open; bool open = true;
/** /**
* Is the connection currently paused? That happens when the * Is the connection currently paused? That happens when the
* buffer was getting too large. It will be unpaused when the * buffer was getting too large. It will be unpaused when the
* buffer is below the threshold again. * buffer is below the threshold again.
*/ */
bool paused; bool paused = false;
SeekState seek_state; SeekState seek_state = SeekState::NONE;
/** /**
* The #Tag object ready to be requested via * The #Tag object ready to be requested via
* InputStream::ReadTag(). * InputStream::ReadTag().
*/ */
Tag *tag; Tag *tag = nullptr;
offset_type seek_offset; offset_type seek_offset;