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/xaudio2_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/xaudio2_s.cpp')
-rw-r--r-- | src/sound/xaudio2_s.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp index 60311ced2..2acfd20a3 100644 --- a/src/sound/xaudio2_s.cpp +++ b/src/sound/xaudio2_s.cpp @@ -125,7 +125,7 @@ static StreamingVoiceContext* _voice_context = nullptr; * Initialises the XAudio2 driver. * * @param parm Driver parameters. -* @return An error message if unsuccessful, or NULL otherwise. +* @return An error message if unsuccessful, or nullptr otherwise. * */ const char *SoundDriver_XAudio2::Start(const char * const *parm) @@ -140,7 +140,7 @@ const char *SoundDriver_XAudio2::Start(const char * const *parm) _xaudio_dll_handle = LoadLibraryA(XAUDIO2_DLL_A); - if (_xaudio_dll_handle == NULL) + if (_xaudio_dll_handle == nullptr) { CoUninitialize(); @@ -150,7 +150,7 @@ const char *SoundDriver_XAudio2::Start(const char * const *parm) API_XAudio2Create xAudio2Create = (API_XAudio2Create) GetProcAddress(_xaudio_dll_handle, "XAudio2Create"); - if (xAudio2Create == NULL) + if (xAudio2Create == nullptr) { FreeLibrary(_xaudio_dll_handle); CoUninitialize(); @@ -248,7 +248,7 @@ const char *SoundDriver_XAudio2::Start(const char * const *parm) return "Failed to submit the first audio buffer"; } - return NULL; + return nullptr; } /** |