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/pcm/PcmExport.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pcm/PcmExport.cxx') diff --git a/src/pcm/PcmExport.cxx b/src/pcm/PcmExport.cxx index fce50a4f3..1054dba4c 100644 --- a/src/pcm/PcmExport.cxx +++ b/src/pcm/PcmExport.cxx @@ -84,7 +84,7 @@ PcmExport::Open(SampleFormat sample_format, unsigned _channels, } size_t -PcmExport::GetFrameSize(const AudioFormat &audio_format) const +PcmExport::GetFrameSize(const AudioFormat &audio_format) const noexcept { if (pack24) /* packed 24 bit samples (3 bytes per sample) */ @@ -109,7 +109,7 @@ PcmExport::GetFrameSize(const AudioFormat &audio_format) const } unsigned -PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const +PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const noexcept { #ifdef ENABLE_DSD if (dsd_u16) @@ -132,7 +132,7 @@ PcmExport::Params::CalcOutputSampleRate(unsigned sample_rate) const } unsigned -PcmExport::Params::CalcInputSampleRate(unsigned sample_rate) const +PcmExport::Params::CalcInputSampleRate(unsigned sample_rate) const noexcept { #ifdef ENABLE_DSD if (dsd_u16) @@ -209,7 +209,7 @@ PcmExport::Export(ConstBuffer data) } size_t -PcmExport::CalcSourceSize(size_t size) const +PcmExport::CalcSourceSize(size_t size) const noexcept { if (pack24) /* 32 bit to 24 bit conversion (4 to 3 bytes) */ -- cgit v1.2.3