summaryrefslogtreecommitdiff
path: root/drivers/alsamidi
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-02 14:52:36 +0200
committerGitHub <noreply@github.com>2020-04-02 14:52:36 +0200
commit058a0afdeca83145d58a95c426dd01216c397ea9 (patch)
treebe0cd59e5a90926e9d653fed9f3b1b77e735ca2f /drivers/alsamidi
parent5f11e1557156617366d2c316a97716172103980d (diff)
parent95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff)
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'drivers/alsamidi')
-rw-r--r--drivers/alsamidi/midi_driver_alsamidi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/alsamidi/midi_driver_alsamidi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp
index 0cecf1de3e..e3e54ea267 100644
--- a/drivers/alsamidi/midi_driver_alsamidi.cpp
+++ b/drivers/alsamidi/midi_driver_alsamidi.cpp
@@ -132,18 +132,18 @@ Error MIDIDriverALSAMidi::open() {
return ERR_CANT_OPEN;
int i = 0;
- for (void **n = hints; *n != NULL; n++) {
+ for (void **n = hints; *n != nullptr; n++) {
char *name = snd_device_name_get_hint(*n, "NAME");
- if (name != NULL) {
+ if (name != nullptr) {
snd_rawmidi_t *midi_in;
- int ret = snd_rawmidi_open(&midi_in, NULL, name, SND_RAWMIDI_NONBLOCK);
+ int ret = snd_rawmidi_open(&midi_in, nullptr, name, SND_RAWMIDI_NONBLOCK);
if (ret >= 0) {
connected_inputs.insert(i++, midi_in);
}
}
- if (name != NULL)
+ if (name != nullptr)
free(name);
}
snd_device_name_free_hint(hints);
@@ -161,7 +161,7 @@ void MIDIDriverALSAMidi::close() {
Thread::wait_to_finish(thread);
memdelete(thread);
- thread = NULL;
+ thread = nullptr;
}
for (int i = 0; i < connected_inputs.size(); i++) {
@@ -202,7 +202,7 @@ PackedStringArray MIDIDriverALSAMidi::get_connected_inputs() {
MIDIDriverALSAMidi::MIDIDriverALSAMidi() {
- thread = NULL;
+ thread = nullptr;
exit_thread = false;
}