From 71f0ed8b7499011b53f90998ebfbd3250fd80948 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 May 2017 14:44:49 +0200 Subject: *: add "noexcept" to many, many function prototypes This eliminates some overhead, because the compiler doesn't need to consider these functions throwing. --- src/MusicChunk.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MusicChunk.cxx') diff --git a/src/MusicChunk.cxx b/src/MusicChunk.cxx index 55a9f98b1..581974ae4 100644 --- a/src/MusicChunk.cxx +++ b/src/MusicChunk.cxx @@ -31,7 +31,7 @@ MusicChunk::~MusicChunk() #ifndef NDEBUG bool -MusicChunk::CheckFormat(const AudioFormat other_format) const +MusicChunk::CheckFormat(const AudioFormat other_format) const noexcept { assert(other_format.IsValid()); @@ -41,7 +41,7 @@ MusicChunk::CheckFormat(const AudioFormat other_format) const WritableBuffer MusicChunk::Write(const AudioFormat af, - SongTime data_time, uint16_t _bit_rate) + SongTime data_time, uint16_t _bit_rate) noexcept { assert(CheckFormat(af)); assert(length == 0 || audio_format.IsValid()); @@ -64,7 +64,7 @@ MusicChunk::Write(const AudioFormat af, } bool -MusicChunk::Expand(const AudioFormat af, size_t _length) +MusicChunk::Expand(const AudioFormat af, size_t _length) noexcept { const size_t frame_size = af.GetFrameSize(); -- cgit v1.2.3