summaryrefslogtreecommitdiff
path: root/src/tile_cmd.h
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-04-10 22:07:06 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-10 23:22:20 +0200
commit7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch)
tree99f134b7e66367cf11e10bc5061896eab4a3264f /src/tile_cmd.h
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/tile_cmd.h')
-rw-r--r--src/tile_cmd.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tile_cmd.h b/src/tile_cmd.h
index ce70232a0..855aa297d 100644
--- a/src/tile_cmd.h
+++ b/src/tile_cmd.h
@@ -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);
}