diff --git a/src/pcm/AudioFormat.hxx b/src/pcm/AudioFormat.hxx index 0399daaaa..321e0ab93 100644 --- a/src/pcm/AudioFormat.hxx +++ b/src/pcm/AudioFormat.hxx @@ -22,7 +22,6 @@ #include "pcm/SampleFormat.hxx" // IWYU pragma: export #include "pcm/ChannelDefs.hxx" // IWYU pragma: export -#include "util/Compiler.h" #include #include @@ -124,14 +123,14 @@ struct AudioFormat { void ApplyMask(AudioFormat mask) noexcept; - gcc_pure + [[gnu::pure]] AudioFormat WithMask(AudioFormat mask) const noexcept { AudioFormat result = *this; result.ApplyMask(mask); return result; } - gcc_pure + [[gnu::pure]] bool MatchMask(AudioFormat mask) const noexcept { return WithMask(mask) == *this; } @@ -226,7 +225,7 @@ AudioFormat::GetFrameSize() const noexcept * @param af the #AudioFormat object * @return the string buffer */ -gcc_const +[[gnu::const]] StringBuffer<24> ToString(AudioFormat af) noexcept; diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx index 6591b7f73..f733a8a03 100644 --- a/src/pcm/SampleFormat.hxx +++ b/src/pcm/SampleFormat.hxx @@ -116,7 +116,7 @@ sample_format_size(SampleFormat format) noexcept * @param format a #SampleFormat enum value * @return the string */ -gcc_pure gcc_returns_nonnull +[[gnu::pure]] [[gnu::returns_nonnull]] const char * sample_format_to_string(SampleFormat format) noexcept;