From 95a1400a2ac9de1a29fa305f45b928ce8e3044bd Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Thu, 2 Apr 2020 01:20:12 +0200 Subject: Replace NULL with nullptr --- drivers/alsamidi/midi_driver_alsamidi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/alsamidi') 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; } -- cgit v1.2.3