diff --git a/src/output/SharedPipeConsumer.hxx b/src/output/SharedPipeConsumer.hxx index 7b2b56ec7..04d1de8b8 100644 --- a/src/output/SharedPipeConsumer.hxx +++ b/src/output/SharedPipeConsumer.hxx @@ -37,28 +37,28 @@ class SharedPipeConsumer { bool consumed; public: - void Init(const MusicPipe &_pipe) { + constexpr void Init(const MusicPipe &_pipe) noexcept { pipe = &_pipe; chunk = nullptr; } - const MusicPipe &GetPipe() { + constexpr const MusicPipe &GetPipe() noexcept { assert(pipe != nullptr); return *pipe; } - bool IsInitial() const { + constexpr bool IsInitial() const noexcept { return chunk == nullptr; } - void Cancel() { + constexpr void Cancel() noexcept { chunk = nullptr; } const MusicChunk *Get() noexcept; - void Consume([[maybe_unused]] const MusicChunk &_chunk) { + constexpr void Consume([[maybe_unused]] const MusicChunk &_chunk) noexcept { assert(chunk != nullptr); assert(chunk == &_chunk); @@ -68,7 +68,7 @@ public: [[gnu::pure]] bool IsConsumed(const MusicChunk &_chunk) const noexcept; - void ClearTail([[maybe_unused]] const MusicChunk &_chunk) noexcept { + constexpr void ClearTail([[maybe_unused]] const MusicChunk &_chunk) noexcept { assert(chunk == &_chunk); assert(consumed); chunk = nullptr;