aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-09 22:02:18 +0100
committerMax Kellermann <max@duempel.org>2014-12-09 22:02:18 +0100
commita588aef921610b92e0a5c7e410617dc594ac39a1 (patch)
tree3a9eb3fba3ccecea721494f32e472b668cac2fb0 /src
parentb70df57f7ba01cda4b57a7fb193b25aa12c649e6 (diff)
downloadmpd-a588aef921610b92e0a5c7e410617dc594ac39a1.tar.gz
mpd-a588aef921610b92e0a5c7e410617dc594ac39a1.tar.xz
mpd-a588aef921610b92e0a5c7e410617dc594ac39a1.zip
output/oss: make the static arrays "constexpr"
Diffstat (limited to 'src')
-rw-r--r--src/output/plugins/OssOutputPlugin.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/plugins/OssOutputPlugin.cxx b/src/output/plugins/OssOutputPlugin.cxx
index 39d87fc35..fc31a1511 100644
--- a/src/output/plugins/OssOutputPlugin.cxx
+++ b/src/output/plugins/OssOutputPlugin.cxx
@@ -124,7 +124,7 @@ oss_stat_device(const char *device, int *errno_r)
return OSS_STAT_NO_ERROR;
}
-static const char *default_devices[] = { "/dev/sound/dsp", "/dev/dsp" };
+static const char *const default_devices[] = { "/dev/sound/dsp", "/dev/dsp" };
static bool
oss_output_test_default_device(void)
@@ -380,7 +380,7 @@ oss_setup_sample_rate(int fd, AudioFormat &audio_format,
break;
}
- static const int sample_rates[] = { 48000, 44100, 0 };
+ static constexpr int sample_rates[] = { 48000, 44100, 0 };
for (unsigned i = 0; sample_rates[i] != 0; ++i) {
sample_rate = sample_rates[i];
if (sample_rate == (int)audio_format.sample_rate)
@@ -572,7 +572,7 @@ oss_setup_sample_format(int fd, AudioFormat &audio_format,
/* the requested sample format is not available - probe for
other formats supported by MPD */
- static const SampleFormat sample_formats[] = {
+ static constexpr SampleFormat sample_formats[] = {
SampleFormat::S24_P32,
SampleFormat::S32,
SampleFormat::S16,