*: 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

@@ -30,8 +30,9 @@
#include <assert.h>
gcc_pure
static int
output_mixer_get_volume(const AudioOutput &ao)
output_mixer_get_volume(const AudioOutput &ao) noexcept
{
if (!ao.enabled)
return -1;
@@ -51,7 +52,7 @@ output_mixer_get_volume(const AudioOutput &ao)
}
int
MultipleOutputs::GetVolume() const
MultipleOutputs::GetVolume() const noexcept
{
unsigned ok = 0;
int total = 0;
@@ -71,7 +72,7 @@ MultipleOutputs::GetVolume() const
}
static bool
output_mixer_set_volume(AudioOutput &ao, unsigned volume)
output_mixer_set_volume(AudioOutput &ao, unsigned volume) noexcept
{
assert(volume <= 100);
@@ -94,7 +95,7 @@ output_mixer_set_volume(AudioOutput &ao, unsigned volume)
}
bool
MultipleOutputs::SetVolume(unsigned volume)
MultipleOutputs::SetVolume(unsigned volume) noexcept
{
assert(volume <= 100);
@@ -107,7 +108,7 @@ MultipleOutputs::SetVolume(unsigned volume)
}
static int
output_mixer_get_software_volume(const AudioOutput &ao)
output_mixer_get_software_volume(const AudioOutput &ao) noexcept
{
if (!ao.enabled)
return -1;
@@ -120,7 +121,7 @@ output_mixer_get_software_volume(const AudioOutput &ao)
}
int
MultipleOutputs::GetSoftwareVolume() const
MultipleOutputs::GetSoftwareVolume() const noexcept
{
unsigned ok = 0;
int total = 0;
@@ -140,7 +141,7 @@ MultipleOutputs::GetSoftwareVolume() const
}
void
MultipleOutputs::SetSoftwareVolume(unsigned volume)
MultipleOutputs::SetSoftwareVolume(unsigned volume) noexcept
{
assert(volume <= PCM_VOLUME_1);