summaryrefslogtreecommitdiff
path: root/src/newgrf_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_sound.cpp')
-rw-r--r--src/newgrf_sound.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp
index 0a04f4400..a25c3abcc 100644
--- a/src/newgrf_sound.cpp
+++ b/src/newgrf_sound.cpp
@@ -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;