mixer/Listener: add noexcept

This commit is contained in:
Max Kellermann 2019-05-31 14:09:47 +02:00
parent 11ec7117ab
commit 7739b3960c
4 changed files with 7 additions and 6 deletions

View File

@ -151,7 +151,7 @@ Partition::OnBorderPause() noexcept
} }
void void
Partition::OnMixerVolumeChanged(gcc_unused Mixer &mixer, gcc_unused int volume) Partition::OnMixerVolumeChanged(Mixer &, int) noexcept
{ {
InvalidateHardwareVolume(); InvalidateHardwareVolume();

View File

@ -257,7 +257,7 @@ private:
void OnBorderPause() noexcept override; void OnBorderPause() noexcept override;
/* virtual methods from class MixerListener */ /* virtual methods from class MixerListener */
void OnMixerVolumeChanged(Mixer &mixer, int volume) override; void OnMixerVolumeChanged(Mixer &mixer, int volume) noexcept override;
/* callback for #global_events */ /* callback for #global_events */
void OnGlobalEvent(unsigned mask); void OnGlobalEvent(unsigned mask);

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2018 The Music Player Daemon Project * Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -28,7 +28,8 @@ class Mixer;
*/ */
class MixerListener { class MixerListener {
public: public:
virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) = 0; virtual void OnMixerVolumeChanged(Mixer &mixer,
int volume) noexcept = 0;
}; };
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2003-2018 The Music Player Daemon Project * Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org * http://www.musicpd.org
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -24,7 +24,7 @@
class NullMixerListener : public MixerListener { class NullMixerListener : public MixerListener {
public: public:
void OnMixerVolumeChanged(Mixer &, int) override {} void OnMixerVolumeChanged(Mixer &, int) noexcept override {}
}; };
#endif #endif