aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmVolume.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-22 17:36:21 +0100
committerMax Kellermann <max@duempel.org>2013-12-22 21:20:40 +0100
commitbfe020e06c2ba0671cdd1dacd9999c986c3168d6 (patch)
tree41a9f57e6987785ca293a8586371f04d023a32df /src/pcm/PcmVolume.hxx
parent5aae560683318b870df9989cdcc2ac576626b234 (diff)
downloadmpd-bfe020e06c2ba0671cdd1dacd9999c986c3168d6.tar.gz
mpd-bfe020e06c2ba0671cdd1dacd9999c986c3168d6.tar.xz
mpd-bfe020e06c2ba0671cdd1dacd9999c986c3168d6.zip
pcm/Volume: make PCM_VOLUME_1 a "constexpr"
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmVolume.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pcm/PcmVolume.hxx b/src/pcm/PcmVolume.hxx
index 8cd82acf7..502fca9ec 100644
--- a/src/pcm/PcmVolume.hxx
+++ b/src/pcm/PcmVolume.hxx
@@ -26,10 +26,11 @@
#include <stdint.h>
#include <stddef.h>
-enum {
- /** this value means "100% volume" */
- PCM_VOLUME_1 = 1024,
-};
+/**
+ * This value means "100% volume".
+ */
+static constexpr unsigned PCM_VOLUME_1 = 1024;
+static constexpr int PCM_VOLUME_1S = PCM_VOLUME_1;
struct AudioFormat;