aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/AlsaMixerPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-28 23:58:17 +0100
committerMax Kellermann <max@duempel.org>2013-10-28 23:58:17 +0100
commit20597b3632d3b6e25ba532716106f90d5b64d0e8 (patch)
treefa6dabaff127150caf3cf4723257f15ef2c3e0f8 /src/mixer/AlsaMixerPlugin.cxx
parent4728735acf20fba24d0d03ab431160e250325869 (diff)
downloadmpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.tar.gz
mpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.tar.xz
mpd-20597b3632d3b6e25ba532716106f90d5b64d0e8.zip
*: use nullptr instead of NULL
Diffstat (limited to '')
-rw-r--r--src/mixer/AlsaMixerPlugin.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx
index f651e94ce..7defdd7be 100644
--- a/src/mixer/AlsaMixerPlugin.cxx
+++ b/src/mixer/AlsaMixerPlugin.cxx
@@ -195,7 +195,7 @@ static snd_mixer_elem_t *
alsa_mixer_lookup_elem(snd_mixer_t *handle, const char *name, unsigned idx)
{
for (snd_mixer_elem_t *elem = snd_mixer_first_elem(handle);
- elem != NULL; elem = snd_mixer_elem_next(elem)) {
+ elem != nullptr; elem = snd_mixer_elem_next(elem)) {
if (snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE &&
StringEqualsCaseASCII(snd_mixer_selem_get_name(elem),
name) &&
@@ -203,7 +203,7 @@ alsa_mixer_lookup_elem(snd_mixer_t *handle, const char *name, unsigned idx)
return elem;
}
- return NULL;
+ return nullptr;
}
inline bool
@@ -218,8 +218,8 @@ AlsaMixer::Setup(Error &error)
return false;
}
- if ((err = snd_mixer_selem_register(handle, NULL,
- NULL)) < 0) {
+ if ((err = snd_mixer_selem_register(handle, nullptr,
+ nullptr)) < 0) {
error.Format(alsa_mixer_domain, err,
"snd_mixer_selem_register() failed: %s",
snd_strerror(err));
@@ -234,7 +234,7 @@ AlsaMixer::Setup(Error &error)
}
elem = alsa_mixer_lookup_elem(handle, control, index);
- if (elem == NULL) {
+ if (elem == nullptr) {
error.Format(alsa_mixer_domain, 0,
"no such mixer control: %s", control);
return false;
@@ -283,11 +283,11 @@ alsa_mixer_open(Mixer *data, Error &error)
inline void
AlsaMixer::Close()
{
- assert(handle != NULL);
+ assert(handle != nullptr);
delete monitor;
- snd_mixer_elem_set_callback(elem, NULL);
+ snd_mixer_elem_set_callback(elem, nullptr);
snd_mixer_close(handle);
}
@@ -305,7 +305,7 @@ AlsaMixer::GetVolume(Error &error)
int ret;
long level;
- assert(handle != NULL);
+ assert(handle != nullptr);
err = snd_mixer_handle_events(handle);
if (err < 0) {
@@ -351,7 +351,7 @@ AlsaMixer::SetVolume(unsigned volume, Error &error)
long level;
int err;
- assert(handle != NULL);
+ assert(handle != nullptr);
vol = volume;