From 7c8e7c6b6e16d4a26259a676db32d8776b99817e Mon Sep 17 00:00:00 2001 From: Henry Wilson Date: Wed, 10 Apr 2019 22:07:06 +0100 Subject: Codechange: Use null pointer literal instead of the NULL macro --- src/sound/cocoa_s.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/sound/cocoa_s.cpp') diff --git a/src/sound/cocoa_s.cpp b/src/sound/cocoa_s.cpp index 8133bf62f..13fe176f5 100644 --- a/src/sound/cocoa_s.cpp +++ b/src/sound/cocoa_s.cpp @@ -80,9 +80,9 @@ const char *SoundDriver_Cocoa::Start(const char * const *parm) desc.componentFlags = 0; desc.componentFlagsMask = 0; - AudioComponent comp = AudioComponentFindNext (NULL, &desc); - if (comp == NULL) { - return "cocoa_s: Failed to start CoreAudio: AudioComponentFindNext returned NULL"; + AudioComponent comp = AudioComponentFindNext (nullptr, &desc); + if (comp == nullptr) { + return "cocoa_s: Failed to start CoreAudio: AudioComponentFindNext returned nullptr"; } /* Open & initialize the default output audio unit */ @@ -101,9 +101,9 @@ const char *SoundDriver_Cocoa::Start(const char * const *parm) desc.componentFlags = 0; desc.componentFlagsMask = 0; - Component comp = FindNextComponent (NULL, &desc); - if (comp == NULL) { - return "cocoa_s: Failed to start CoreAudio: FindNextComponent returned NULL"; + Component comp = FindNextComponent (nullptr, &desc); + if (comp == nullptr) { + return "cocoa_s: Failed to start CoreAudio: FindNextComponent returned nullptr"; } /* Open & initialize the default output audio unit */ @@ -126,7 +126,7 @@ const char *SoundDriver_Cocoa::Start(const char * const *parm) /* Set the audio callback */ callback.inputProc = audioCallback; - callback.inputProcRefCon = NULL; + callback.inputProcRefCon = nullptr; if (AudioUnitSetProperty(_outputAudioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &callback, sizeof(callback)) != noErr) { return "cocoa_s: Failed to start CoreAudio: AudioUnitSetProperty (kAudioUnitProperty_SetRenderCallback)"; } @@ -137,7 +137,7 @@ const char *SoundDriver_Cocoa::Start(const char * const *parm) } /* We're running! */ - return NULL; + return nullptr; } -- cgit v1.2.3-54-g00ecf