diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-04-10 22:07:06 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-10 23:22:20 +0200 |
commit | 7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch) | |
tree | 99f134b7e66367cf11e10bc5061896eab4a3264f /src/sound/cocoa_s.cpp | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/sound/cocoa_s.cpp')
-rw-r--r-- | src/sound/cocoa_s.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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; } |