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

@@ -249,7 +249,7 @@ alsa_test_default_device()
*/
gcc_const
static snd_pcm_format_t
ToAlsaPcmFormat(SampleFormat sample_format)
ToAlsaPcmFormat(SampleFormat sample_format) noexcept
{
switch (sample_format) {
case SampleFormat::UNDEFINED:
@@ -287,7 +287,7 @@ ToAlsaPcmFormat(SampleFormat sample_format)
* SND_PCM_FORMAT_UNKNOWN if the format cannot be byte-swapped.
*/
static snd_pcm_format_t
ByteSwapAlsaPcmFormat(snd_pcm_format_t fmt)
ByteSwapAlsaPcmFormat(snd_pcm_format_t fmt) noexcept
{
switch (fmt) {
case SND_PCM_FORMAT_S16_LE: return SND_PCM_FORMAT_S16_BE;