From 99a447dff5b8d28316f4046489e36fabd1ea6ed3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Sep 2017 19:54:07 +0200 Subject: [PATCH] input/async: use C++11 initializers --- src/input/AsyncInputStream.cxx | 6 +----- src/input/AsyncInputStream.hxx | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index ec28e8bc8..22d0a309a 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -38,11 +38,7 @@ AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url, deferred_seek(event_loop, BIND_THIS_METHOD(DeferredSeek)), allocation(_buffer_size), buffer((uint8_t *)allocation.get(), _buffer_size), - resume_at(_resume_at), - open(true), - paused(false), - seek_state(SeekState::NONE), - tag(nullptr) {} + resume_at(_resume_at) {} AsyncInputStream::~AsyncInputStream() { diff --git a/src/input/AsyncInputStream.hxx b/src/input/AsyncInputStream.hxx index e986f623b..14a7bbb8a 100644 --- a/src/input/AsyncInputStream.hxx +++ b/src/input/AsyncInputStream.hxx @@ -46,22 +46,22 @@ class AsyncInputStream : public InputStream { CircularBuffer buffer; const size_t resume_at; - bool open; + bool open = true; /** * Is the connection currently paused? That happens when the * buffer was getting too large. It will be unpaused when the * 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 * InputStream::ReadTag(). */ - Tag *tag; + Tag *tag = nullptr; offset_type seek_offset;