summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/command.cpp b/src/command.cpp
index b914563fc..7f5dd4309 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -361,7 +361,7 @@ static const Command _command_proc_table[] = {
};
/*!
- * This function range-checks a cmd, and checks if the cmd is not NULL
+ * This function range-checks a cmd, and checks if the cmd is not nullptr
*
* @param cmd The integer value of a command
* @return true if the command is valid (and got a CommandProc function)
@@ -370,7 +370,7 @@ bool IsValidCommand(uint32 cmd)
{
cmd &= CMD_ID_MASK;
- return cmd < lengthof(_command_proc_table) && _command_proc_table[cmd].proc != NULL;
+ return cmd < lengthof(_command_proc_table) && _command_proc_table[cmd].proc != nullptr;
}
/*!
@@ -594,7 +594,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
ShowCostOrIncomeAnimation(x, y, GetSlopePixelZ(x, y), res.GetCost());
}
- if (!estimate_only && !only_sending && callback != NULL) {
+ if (!estimate_only && !only_sending && callback != nullptr) {
callback(res, tile, p1, p2);
}
@@ -637,7 +637,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
CommandProc *proc = _command_proc_table[cmd_id].proc;
/* Shouldn't happen, but you never know when someone adds
* NULLs to the _command_proc_table. */
- assert(proc != NULL);
+ assert(proc != nullptr);
/* Command flags are used internally */
CommandFlags cmd_flags = GetCommandFlags(cmd);
@@ -750,7 +750,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
/* update last build coordinate of company. */
if (tile != 0) {
Company *c = Company::GetIfValid(_current_company);
- if (c != NULL) c->last_build_coordinate = tile;
+ if (c != nullptr) c->last_build_coordinate = tile;
}
SubtractMoneyFromCompany(res2);