summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-06-08 21:42:12 +0200
committerMax Kellermann <max@musicpd.org>2017-06-08 21:42:57 +0200
commit13b04dc908aec4aa57a943d03e8689184c592e01 (patch)
tree909d4020c9dfec0d42643d71e98a52a33b6ebc12
parent011106b517a9e46d9815beb6b33fb514fbee5568 (diff)
mixer/Internal: add "noexcept"
-rw-r--r--src/mixer/MixerInternal.hxx7
-rw-r--r--src/mixer/plugins/AlsaMixerPlugin.cxx4
-rw-r--r--src/mixer/plugins/HaikuMixerPlugin.cxx2
-rw-r--r--src/mixer/plugins/NullMixerPlugin.cxx2
-rw-r--r--src/mixer/plugins/OssMixerPlugin.cxx4
-rw-r--r--src/mixer/plugins/PulseMixerPlugin.cxx2
-rw-r--r--src/mixer/plugins/RoarMixerPlugin.cxx2
-rw-r--r--src/mixer/plugins/SoftwareMixerPlugin.cxx2
-rw-r--r--src/mixer/plugins/WinmmMixerPlugin.cxx2
9 files changed, 14 insertions, 13 deletions
diff --git a/src/mixer/MixerInternal.hxx b/src/mixer/MixerInternal.hxx
index 1191bea0c..34ee0a1d7 100644
--- a/src/mixer/MixerInternal.hxx
+++ b/src/mixer/MixerInternal.hxx
@@ -51,14 +51,15 @@ public:
bool failed = false;
public:
- explicit Mixer(const MixerPlugin &_plugin, MixerListener &_listener)
+ explicit Mixer(const MixerPlugin &_plugin,
+ MixerListener &_listener) noexcept
:plugin(_plugin), listener(_listener) {}
Mixer(const Mixer &) = delete;
virtual ~Mixer() {}
- bool IsPlugin(const MixerPlugin &other) const {
+ bool IsPlugin(const MixerPlugin &other) const noexcept {
return &plugin == &other;
}
@@ -72,7 +73,7 @@ public:
/**
* Close mixer device
*/
- virtual void Close() = 0;
+ virtual void Close() noexcept = 0;
/**
* Reads the current volume.
diff --git a/src/mixer/plugins/AlsaMixerPlugin.cxx b/src/mixer/plugins/AlsaMixerPlugin.cxx
index a62d5a587..49ec15c3b 100644
--- a/src/mixer/plugins/AlsaMixerPlugin.cxx
+++ b/src/mixer/plugins/AlsaMixerPlugin.cxx
@@ -95,7 +95,7 @@ public:
/* virtual methods from class Mixer */
void Open() override;
- void Close() override;
+ void Close() noexcept override;
int GetVolume() override;
void SetVolume(unsigned volume) override;
};
@@ -252,7 +252,7 @@ AlsaMixer::Open()
}
void
-AlsaMixer::Close()
+AlsaMixer::Close() noexcept
{
assert(handle != nullptr);
diff --git a/src/mixer/plugins/HaikuMixerPlugin.cxx b/src/mixer/plugins/HaikuMixerPlugin.cxx
index 07da75547..f0b50a91c 100644
--- a/src/mixer/plugins/HaikuMixerPlugin.cxx
+++ b/src/mixer/plugins/HaikuMixerPlugin.cxx
@@ -40,7 +40,7 @@ public:
virtual void Open() override {
}
- virtual void Close() override {
+ void Close() noexcept override {
}
virtual int GetVolume() override;
diff --git a/src/mixer/plugins/NullMixerPlugin.cxx b/src/mixer/plugins/NullMixerPlugin.cxx
index fe4fbdf4a..66b6409b1 100644
--- a/src/mixer/plugins/NullMixerPlugin.cxx
+++ b/src/mixer/plugins/NullMixerPlugin.cxx
@@ -37,7 +37,7 @@ public:
void Open() override {
}
- void Close() override {
+ void Close() noexcept override {
}
int GetVolume() override {
diff --git a/src/mixer/plugins/OssMixerPlugin.cxx b/src/mixer/plugins/OssMixerPlugin.cxx
index 28ceb3936..72cb72a47 100644
--- a/src/mixer/plugins/OssMixerPlugin.cxx
+++ b/src/mixer/plugins/OssMixerPlugin.cxx
@@ -59,7 +59,7 @@ public:
/* virtual methods from class Mixer */
void Open() override;
- void Close() override;
+ void Close() noexcept override;
int GetVolume() override;
void SetVolume(unsigned volume) override;
};
@@ -105,7 +105,7 @@ oss_mixer_init(gcc_unused EventLoop &event_loop, gcc_unused AudioOutput &ao,
}
void
-OssMixer::Close()
+OssMixer::Close() noexcept
{
assert(device_fd >= 0);
diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx
index 41e730f37..5919e0ee6 100644
--- a/src/mixer/plugins/PulseMixerPlugin.cxx
+++ b/src/mixer/plugins/PulseMixerPlugin.cxx
@@ -59,7 +59,7 @@ public:
void Open() override {
}
- void Close() override {
+ void Close() noexcept override {
}
int GetVolume() override;
diff --git a/src/mixer/plugins/RoarMixerPlugin.cxx b/src/mixer/plugins/RoarMixerPlugin.cxx
index 531339350..d3df5f910 100644
--- a/src/mixer/plugins/RoarMixerPlugin.cxx
+++ b/src/mixer/plugins/RoarMixerPlugin.cxx
@@ -37,7 +37,7 @@ public:
void Open() override {
}
- virtual void Close() override {
+ void Close() noexcept override {
}
int GetVolume() override;
diff --git a/src/mixer/plugins/SoftwareMixerPlugin.cxx b/src/mixer/plugins/SoftwareMixerPlugin.cxx
index 14c35e7f1..15dca0e69 100644
--- a/src/mixer/plugins/SoftwareMixerPlugin.cxx
+++ b/src/mixer/plugins/SoftwareMixerPlugin.cxx
@@ -50,7 +50,7 @@ public:
void Open() override {
}
- virtual void Close() override {
+ void Close() noexcept override {
}
int GetVolume() override {
diff --git a/src/mixer/plugins/WinmmMixerPlugin.cxx b/src/mixer/plugins/WinmmMixerPlugin.cxx
index 64fa85a07..bfbbe9d3d 100644
--- a/src/mixer/plugins/WinmmMixerPlugin.cxx
+++ b/src/mixer/plugins/WinmmMixerPlugin.cxx
@@ -43,7 +43,7 @@ public:
void Open() override {
}
- void Close() override {
+ void Close() noexcept override {
}
int GetVolume() override;