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/mixer.cpp | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/mixer.cpp')
-rw-r--r-- | src/mixer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mixer.cpp b/src/mixer.cpp index 6014f6082..5f3eeb42a 100644 --- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -39,7 +39,7 @@ struct MixerChannel { static MixerChannel _channels[8]; static uint32 _play_rate = 11025; static uint32 _max_size = UINT_MAX; -static MxStreamCallback _music_stream = NULL; +static MxStreamCallback _music_stream = nullptr; /** * The theoretical maximum volume for a single sound sample. Multiple sound @@ -175,11 +175,11 @@ MixerChannel *MxAllocateChannel() for (mc = _channels; mc != endof(_channels); mc++) { if (!mc->active) { free(mc->memory); - mc->memory = NULL; + mc->memory = nullptr; return mc; } } - return NULL; + return nullptr; } void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, size_t size, uint rate, bool is16bit) @@ -238,6 +238,6 @@ bool MxInitialize(uint rate) { _play_rate = rate; _max_size = UINT_MAX / _play_rate; - _music_stream = NULL; /* rate may have changed, any music source is now invalid */ + _music_stream = nullptr; /* rate may have changed, any music source is now invalid */ return true; } |