Merge: Codechange: Use null pointer literal instead of the NULL macro
This commit is contained in:
@@ -170,22 +170,22 @@ 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 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