MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsValidCommand

Function IsValidCommand

src/command.cpp:106–109  ·  view source on GitHub ↗

* This function range-checks a cmd. * * @param cmd The integer value of a command * @return true if the command is valid (and got a CommandProc function) */

Source from the content-addressed store, hash-verified

104 * @return true if the command is valid (and got a CommandProc function)
105 */
106bool IsValidCommand(Commands cmd)
107{
108 return cmd < _command_proc_table.size();
109}
110
111/**
112 * This function mask the parameter with CMD_ID_MASK and returns

Callers 4

GetCommandFlagsFunction · 0.85
GetCommandNameFunction · 0.85
ReceiveCommandMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected