diff --git a/src/decoder/Bridge.cxx b/src/decoder/Bridge.cxx index 969dbd8b8..871dc503c 100644 --- a/src/decoder/Bridge.cxx +++ b/src/decoder/Bridge.cxx @@ -214,7 +214,7 @@ DecoderBridge::DoSendTag(const Tag &tag) } bool -DecoderBridge::UpdateStreamTag(InputStream *is) +DecoderBridge::UpdateStreamTag(InputStream *is) noexcept { auto tag = is != nullptr ? is->LockReadTag() diff --git a/src/decoder/Bridge.hxx b/src/decoder/Bridge.hxx index 0077b2b68..b4a3cb524 100644 --- a/src/decoder/Bridge.hxx +++ b/src/decoder/Bridge.hxx @@ -174,7 +174,7 @@ private: */ DecoderCommand DoSendTag(const Tag &tag); - bool UpdateStreamTag(InputStream *is); + bool UpdateStreamTag(InputStream *is) noexcept; }; #endif diff --git a/src/input/AsyncInputStream.cxx b/src/input/AsyncInputStream.cxx index 9d457852b..ce78d166d 100644 --- a/src/input/AsyncInputStream.cxx +++ b/src/input/AsyncInputStream.cxx @@ -157,7 +157,7 @@ AsyncInputStream::SeekDone() noexcept } std::unique_ptr -AsyncInputStream::ReadTag() +AsyncInputStream::ReadTag() noexcept { return std::exchange(tag, nullptr); } diff --git a/src/input/AsyncInputStream.hxx b/src/input/AsyncInputStream.hxx index fb71ba5e1..958f5f690 100644 --- a/src/input/AsyncInputStream.hxx +++ b/src/input/AsyncInputStream.hxx @@ -84,7 +84,7 @@ public: void Check() final; bool IsEOF() noexcept final; void Seek(offset_type new_offset) final; - std::unique_ptr ReadTag() final; + std::unique_ptr ReadTag() noexcept final; bool IsAvailable() noexcept final; size_t Read(void *ptr, size_t read_size) final; diff --git a/src/input/FailingInputStream.hxx b/src/input/FailingInputStream.hxx index d8436f195..008a1ceae 100644 --- a/src/input/FailingInputStream.hxx +++ b/src/input/FailingInputStream.hxx @@ -53,10 +53,6 @@ public: return false; } - std::unique_ptr ReadTag() override { - std::rethrow_exception(error); - } - size_t Read(void *, size_t) override { std::rethrow_exception(error); } diff --git a/src/input/IcyInputStream.cxx b/src/input/IcyInputStream.cxx index df87b7785..4614d8f81 100644 --- a/src/input/IcyInputStream.cxx +++ b/src/input/IcyInputStream.cxx @@ -47,7 +47,7 @@ IcyInputStream::Update() noexcept } std::unique_ptr -IcyInputStream::ReadTag() +IcyInputStream::ReadTag() noexcept { auto new_input_tag = ProxyInputStream::ReadTag(); if (!IsEnabled()) diff --git a/src/input/IcyInputStream.hxx b/src/input/IcyInputStream.hxx index c134fbae1..5a6a69074 100644 --- a/src/input/IcyInputStream.hxx +++ b/src/input/IcyInputStream.hxx @@ -65,7 +65,7 @@ public: /* virtual methods from InputStream */ void Update() noexcept override; - std::unique_ptr ReadTag() override; + std::unique_ptr ReadTag() noexcept override; size_t Read(void *ptr, size_t size) override; }; diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx index b6433c5ae..e125a0409 100644 --- a/src/input/InputStream.cxx +++ b/src/input/InputStream.cxx @@ -92,13 +92,13 @@ InputStream::LockSkip(offset_type _offset) } std::unique_ptr -InputStream::ReadTag() +InputStream::ReadTag() noexcept { return nullptr; } std::unique_ptr -InputStream::LockReadTag() +InputStream::LockReadTag() noexcept { const std::lock_guard protect(mutex); return ReadTag(); diff --git a/src/input/InputStream.hxx b/src/input/InputStream.hxx index 4d012e91a..ba8156d6e 100644 --- a/src/input/InputStream.hxx +++ b/src/input/InputStream.hxx @@ -325,13 +325,13 @@ public: * @return a tag object or nullptr if the tag has not changed * since the last call */ - virtual std::unique_ptr ReadTag(); + virtual std::unique_ptr ReadTag() noexcept; /** * Wrapper for ReadTag() which locks and unlocks the mutex; * the caller must not be holding it already. */ - std::unique_ptr LockReadTag(); + std::unique_ptr LockReadTag() noexcept; /** * Returns true if the next read operation will not block: either data diff --git a/src/input/ProxyInputStream.cxx b/src/input/ProxyInputStream.cxx index 0d9d808b8..917e53fe1 100644 --- a/src/input/ProxyInputStream.cxx +++ b/src/input/ProxyInputStream.cxx @@ -105,7 +105,7 @@ ProxyInputStream::IsEOF() noexcept } std::unique_ptr -ProxyInputStream::ReadTag() +ProxyInputStream::ReadTag() noexcept { if (!input) return nullptr; diff --git a/src/input/ProxyInputStream.hxx b/src/input/ProxyInputStream.hxx index e04e4312a..853deb11c 100644 --- a/src/input/ProxyInputStream.hxx +++ b/src/input/ProxyInputStream.hxx @@ -62,7 +62,7 @@ public: void Update() noexcept override; void Seek(offset_type new_offset) override; bool IsEOF() noexcept override; - std::unique_ptr ReadTag() override; + std::unique_ptr ReadTag() noexcept override; bool IsAvailable() noexcept override; size_t Read(void *ptr, size_t read_size) override;