Skip to content

Commit

Permalink
output/SharedPipeConsumer: add noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 26, 2023
1 parent 31bf6d2 commit e9c40de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/output/SharedPipeConsumer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit e9c40de

Please sign in to comment.