From e2040ed3953ebe4488a8040a392855000f8c77b1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Jul 2022 13:25:02 +0200 Subject: [PATCH] output/Multiple: use [[gnu::pure]] --- src/output/MultipleOutputs.hxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/output/MultipleOutputs.hxx b/src/output/MultipleOutputs.hxx index 11b05839b..4c4e260fd 100644 --- a/src/output/MultipleOutputs.hxx +++ b/src/output/MultipleOutputs.hxx @@ -26,7 +26,6 @@ #include "pcm/AudioFormat.hxx" #include "ReplayGainMode.hxx" #include "Chrono.hxx" -#include "util/Compiler.h" #include #include @@ -82,7 +81,7 @@ public: * Returns the total number of audio output devices, including * those which are disabled right now. */ - gcc_pure + [[gnu::pure]] unsigned Size() const noexcept { return outputs.size(); } @@ -105,7 +104,7 @@ public: /** * Are all outputs dummy? */ - gcc_pure + [[gnu::pure]] bool IsDummy() const noexcept { return std::all_of(outputs.begin(), outputs.end(), [](const auto &i) { return i->IsDummy(); }); } @@ -114,13 +113,13 @@ public: * Returns the audio output device with the specified name. * Returns nullptr if the name does not exist. */ - gcc_pure + [[gnu::pure]] AudioOutputControl *FindByName(std::string_view name) noexcept; /** * Does an audio output device with this name exist? */ - gcc_pure + [[gnu::pure]] bool HasName(std::string_view name) noexcept { return FindByName(name) != nullptr; } @@ -135,7 +134,7 @@ public: * Returns the average volume of all available mixers (range * 0..100). Returns -1 if no mixer can be queried. */ - gcc_pure + [[gnu::pure]] int GetVolume() const noexcept; /** @@ -152,7 +151,7 @@ public: * software mixers. See #software_mixer_plugin. This * function fails if no software mixer is configured. */ - gcc_pure + [[gnu::pure]] int GetSoftwareVolume() const noexcept; /**