diff options
author | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
commit | 71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch) | |
tree | e9c2f66fbef231858f46d878864199d46e6ce21c /src/output/MultipleOutputs.hxx | |
parent | ac2e4e593d407e41db49fdb9ae2da6bc1557f618 (diff) |
*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
Diffstat (limited to 'src/output/MultipleOutputs.hxx')
-rw-r--r-- | src/output/MultipleOutputs.hxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/output/MultipleOutputs.hxx b/src/output/MultipleOutputs.hxx index a6366cf89..014978882 100644 --- a/src/output/MultipleOutputs.hxx +++ b/src/output/MultipleOutputs.hxx @@ -109,7 +109,7 @@ public: * Returns nullptr if the name does not exist. */ gcc_pure - AudioOutput *FindByName(const char *name) const; + AudioOutput *FindByName(const char *name) const noexcept; /** * Checks the "enabled" flag of all audio outputs, and if one has @@ -195,7 +195,7 @@ public: * 0..100). Returns -1 if no mixer can be queried. */ gcc_pure - int GetVolume() const; + int GetVolume() const noexcept; /** * Sets the volume on all available mixers. @@ -203,7 +203,7 @@ public: * @param volume the volume (range 0..100) * @return true on success, false on failure */ - bool SetVolume(unsigned volume); + bool SetVolume(unsigned volume) noexcept; /** * Similar to GetVolume(), but gets the volume only for @@ -211,7 +211,7 @@ public: * function fails if no software mixer is configured. */ gcc_pure - int GetSoftwareVolume() const; + int GetSoftwareVolume() const noexcept; /** * Similar to SetVolume(), but sets the volume only for @@ -219,7 +219,7 @@ public: * function cannot fail, because the underlying software * mixers cannot fail either. */ - void SetSoftwareVolume(unsigned volume); + void SetSoftwareVolume(unsigned volume) noexcept; private: /** @@ -227,9 +227,9 @@ private: * command. */ gcc_pure - bool AllFinished() const; + bool AllFinished() const noexcept; - void WaitAll(); + void WaitAll() noexcept; /** * Signals all audio outputs which are open. @@ -247,7 +247,7 @@ private: /** * Has this chunk been consumed by all audio outputs? */ - bool IsChunkConsumed(const MusicChunk *chunk) const; + bool IsChunkConsumed(const MusicChunk *chunk) const noexcept; /** * There's only one chunk left in the pipe (#pipe), and all |