Commit 7d7fe756 authored by Max Kellermann's avatar Max Kellermann

pcm/AudioFormat: use [[gnu::pure]]

parent 1cb7fe12
......@@ -22,7 +22,6 @@
#include "pcm/SampleFormat.hxx" // IWYU pragma: export
#include "pcm/ChannelDefs.hxx" // IWYU pragma: export
#include "util/Compiler.h"
#include <cstddef>
#include <cstdint>
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment