summaryrefslogtreecommitdiff
path: root/drivers/alsamidi/midi_driver_alsamidi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/alsamidi/midi_driver_alsamidi.cpp')
-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;
}