mixer/Internal: add "noexcept"

This commit is contained in:
Max Kellermann 2017-06-08 21:42:12 +02:00
parent 011106b517
commit 13b04dc908
9 changed files with 14 additions and 13 deletions

View File

@ -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.

View File

@ -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);

View File

@ -40,7 +40,7 @@ public:
virtual void Open() override {
}
virtual void Close() override {
void Close() noexcept override {
}
virtual int GetVolume() override;

View File

@ -37,7 +37,7 @@ public:
void Open() override {
}
void Close() override {
void Close() noexcept override {
}
int GetVolume() override {

View File

@ -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);

View File

@ -59,7 +59,7 @@ public:
void Open() override {
}
void Close() override {
void Close() noexcept override {
}
int GetVolume() override;

View File

@ -37,7 +37,7 @@ public:
void Open() override {
}
virtual void Close() override {
void Close() noexcept override {
}
int GetVolume() override;

View File

@ -50,7 +50,7 @@ public:
void Open() override {
}
virtual void Close() override {
void Close() noexcept override {
}
int GetVolume() override {

View File

@ -43,7 +43,7 @@ public:
void Open() override {
}
void Close() override {
void Close() noexcept override {
}
int GetVolume() override;