summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-03 15:39:49 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commitb6933a2ebdf66c5fb23b2226d3ce07d71426d7d2 (patch)
tree0cb31934ea674ea3b8bb23dd118db803b319fe7c /src/command.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 7d1a72dec..b971ccb6b 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -449,23 +449,23 @@ static int _docommand_recursive = 0;
*/
CommandCost DoCommand(const CommandContainer *container, DoCommandFlag flags)
{
- return DoCommand(container->tile, container->p1, container->p2, flags, container->cmd & CMD_ID_MASK, container->text);
+ return DoCommand(flags, container->cmd & CMD_ID_MASK, container->tile, container->p1, container->p2, container->text);
}
/*!
* This function executes a given command with the parameters from the #CommandProc parameter list.
* Depending on the flags parameter it execute or test a command.
*
+ * @param flags Flags for the command and how to execute the command
+ * @param cmd The command-id to execute (a value of the CMD_* enums)
* @param tile The tile to apply the command on (for the #CommandProc)
* @param p1 Additional data for the command (for the #CommandProc)
* @param p2 Additional data for the command (for the #CommandProc)
- * @param flags Flags for the command and how to execute the command
- * @param cmd The command-id to execute (a value of the CMD_* enums)
* @param text The text to pass
* @see CommandProc
* @return the cost
*/
-CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags, uint32 cmd, const std::string &text)
+CommandCost DoCommand(DoCommandFlag flags, uint32 cmd, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
CommandCost res;