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

@@ -66,7 +66,7 @@ struct AudioFileInputStream {
gcc_pure
static SongTime
audiofile_get_duration(AFfilehandle fh)
audiofile_get_duration(AFfilehandle fh) noexcept
{
return SongTime::FromScale<uint64_t>(afGetFrameCount(fh, AF_DEFAULT_TRACK),
afGetRate(fh, AF_DEFAULT_TRACK));
@@ -239,7 +239,7 @@ audiofile_stream_decode(DecoderClient &client, InputStream &is)
gcc_pure
static SignedSongTime
audiofile_get_duration(InputStream &is)
audiofile_get_duration(InputStream &is) noexcept
{
if (!is.IsSeekable() || !is.KnownSize())
return SignedSongTime::Negative();