forked from mirror/OpenTTD
Codechange: Use null pointer literal instead of the NULL macro
This commit is contained in:
committed by
Michael Lutz
parent
3b4f224c0b
commit
7c8e7c6b6e
@@ -168,29 +168,29 @@ void GetTileDesc(TileIndex tile, TileDesc *td);
|
||||
static inline void AddAcceptedCargo(TileIndex tile, CargoArray &acceptance, CargoTypes *always_accepted)
|
||||
{
|
||||
AddAcceptedCargoProc *proc = _tile_type_procs[GetTileType(tile)]->add_accepted_cargo_proc;
|
||||
if (proc == NULL) return;
|
||||
CargoTypes dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != NULL' checks
|
||||
proc(tile, acceptance, always_accepted == NULL ? &dummy : always_accepted);
|
||||
if (proc == nullptr) return;
|
||||
CargoTypes dummy = 0; // use dummy bitmask so there don't need to be several 'always_accepted != nullptr' checks
|
||||
proc(tile, acceptance, always_accepted == nullptr ? &dummy : always_accepted);
|
||||
}
|
||||
|
||||
static inline void AddProducedCargo(TileIndex tile, CargoArray &produced)
|
||||
{
|
||||
AddProducedCargoProc *proc = _tile_type_procs[GetTileType(tile)]->add_produced_cargo_proc;
|
||||
if (proc == NULL) return;
|
||||
if (proc == nullptr) return;
|
||||
proc(tile, produced);
|
||||
}
|
||||
|
||||
static inline void AnimateTile(TileIndex tile)
|
||||
{
|
||||
AnimateTileProc *proc = _tile_type_procs[GetTileType(tile)]->animate_tile_proc;
|
||||
assert(proc != NULL);
|
||||
assert(proc != nullptr);
|
||||
proc(tile);
|
||||
}
|
||||
|
||||
static inline bool ClickTile(TileIndex tile)
|
||||
{
|
||||
ClickTileProc *proc = _tile_type_procs[GetTileType(tile)]->click_tile_proc;
|
||||
if (proc == NULL) return false;
|
||||
if (proc == nullptr) return false;
|
||||
return proc(tile);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user