summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-05-31 14:09:47 +0200
committerMax Kellermann <max@musicpd.org>2019-05-31 14:09:47 +0200
commit7739b3960c8bfefa2e439207a891db76004f5c2c (patch)
tree14f9be4c00b0446546125d6ff5e1fd0b43b5a97d
parent11ec7117ab8dc7b1159bb910da2b275e0638521d (diff)
mixer/Listener: add `noexcept`
-rw-r--r--src/Partition.cxx2
-rw-r--r--src/Partition.hxx2
-rw-r--r--src/mixer/Listener.hxx5
-rw-r--r--test/NullMixerListener.hxx4
4 files changed, 7 insertions, 6 deletions
diff --git a/src/Partition.cxx b/src/Partition.cxx
index 6f1e53fda..b2dd6bd0b 100644
--- a/src/Partition.cxx
+++ b/src/Partition.cxx
@@ -151,7 +151,7 @@ Partition::OnBorderPause() noexcept
}
void
-Partition::OnMixerVolumeChanged(gcc_unused Mixer &mixer, gcc_unused int volume)
+Partition::OnMixerVolumeChanged(Mixer &, int) noexcept
{
InvalidateHardwareVolume();
diff --git a/src/Partition.hxx b/src/Partition.hxx
index 176668d99..b4fd83af9 100644
--- a/src/Partition.hxx
+++ b/src/Partition.hxx
@@ -257,7 +257,7 @@ private:
void OnBorderPause() noexcept override;
/* virtual methods from class MixerListener */
- void OnMixerVolumeChanged(Mixer &mixer, int volume) override;
+ void OnMixerVolumeChanged(Mixer &mixer, int volume) noexcept override;
/* callback for #global_events */
void OnGlobalEvent(unsigned mask);
diff --git a/src/mixer/Listener.hxx b/src/mixer/Listener.hxx
index 84361e56c..18c54cf94 100644
--- a/src/mixer/Listener.hxx
+++ b/src/mixer/Listener.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2018 The Music Player Daemon Project
+ * Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,8 @@ class Mixer;
*/
class MixerListener {
public:
- virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) = 0;
+ virtual void OnMixerVolumeChanged(Mixer &mixer,
+ int volume) noexcept = 0;
};
#endif
diff --git a/test/NullMixerListener.hxx b/test/NullMixerListener.hxx
index ed3986f41..3b5b05b82 100644
--- a/test/NullMixerListener.hxx
+++ b/test/NullMixerListener.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2018 The Music Player Daemon Project
+ * Copyright 2003-2019 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
class NullMixerListener : public MixerListener {
public:
- void OnMixerVolumeChanged(Mixer &, int) override {}
+ void OnMixerVolumeChanged(Mixer &, int) noexcept override {}
};
#endif