Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Henry Wilson
2019-04-10 22:07:06 +01:00
committed by Michael Lutz
parent 3b4f224c0b
commit 7c8e7c6b6e
463 changed files with 5674 additions and 5674 deletions

View File

@@ -49,7 +49,7 @@ void InitializeSoundPool()
SoundEntry *GetSound(SoundID index)
{
if (index >= _sounds.size()) return NULL;
if (index >= _sounds.size()) return nullptr;
return &_sounds[index];
}
@@ -173,7 +173,7 @@ SoundID GetNewGRFSoundID(const GRFFile *file, SoundID sound_id)
if (sound_id < ORIGINAL_SAMPLE_COUNT) return sound_id;
sound_id -= ORIGINAL_SAMPLE_COUNT;
if (file == NULL || sound_id >= file->num_sounds) return INVALID_SOUND;
if (file == nullptr || sound_id >= file->num_sounds) return INVALID_SOUND;
return file->sound_offset + sound_id;
}
@@ -192,7 +192,7 @@ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event)
uint16 callback;
/* If the engine has no GRF ID associated it can't ever play any new sounds */
if (file == NULL) return false;
if (file == nullptr) return false;
/* Check that the vehicle type uses the sound effect callback */
if (!HasBit(EngInfo(v->engine_type)->callback_mask, CBM_VEHICLE_SOUND_EFFECT)) return false;