*: add "noexcept" to many, many function prototypes

This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
This commit is contained in:
Max Kellermann
2017-05-08 14:44:49 +02:00
parent ac2e4e593d
commit 71f0ed8b74
272 changed files with 873 additions and 846 deletions

View File

@@ -94,7 +94,7 @@ MultipleOutputs::Configure(EventLoop &event_loop,
}
AudioOutput *
MultipleOutputs::FindByName(const char *name) const
MultipleOutputs::FindByName(const char *name) const noexcept
{
for (auto i : outputs)
if (strcmp(i->GetName(), name) == 0)
@@ -120,7 +120,7 @@ MultipleOutputs::EnableDisable()
}
bool
MultipleOutputs::AllFinished() const
MultipleOutputs::AllFinished() const noexcept
{
for (auto ao : outputs) {
const std::lock_guard<Mutex> protect(ao->mutex);
@@ -132,7 +132,7 @@ MultipleOutputs::AllFinished() const
}
void
MultipleOutputs::WaitAll()
MultipleOutputs::WaitAll() noexcept
{
while (!AllFinished())
audio_output_client_notify.Wait();
@@ -243,7 +243,7 @@ MultipleOutputs::Open(const AudioFormat audio_format,
}
bool
MultipleOutputs::IsChunkConsumed(const MusicChunk *chunk) const
MultipleOutputs::IsChunkConsumed(const MusicChunk *chunk) const noexcept
{
for (auto ao : outputs)
if (!ao->LockIsChunkConsumed(*chunk))