summaryrefslogtreecommitdiff
path: root/src/group_cmd.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/group_cmd.cpp
parent39e8783f4b8d24a27d28f99905acf8f54dec24fa (diff)
downloadopenttd-b6933a2ebdf66c5fb23b2226d3ce07d71426d7d2.tar.xz
Codechange: Move command arguments to the back of the DoCommand function call.
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r--src/group_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index 50b361d00..ec4358f76 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -356,12 +356,12 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if (g == nullptr || g->owner != _current_company) return CMD_ERROR;
/* Remove all vehicles from the group */
- DoCommand(0, p1, 0, flags, CMD_REMOVE_ALL_VEHICLES_GROUP);
+ DoCommand(flags, CMD_REMOVE_ALL_VEHICLES_GROUP, 0, p1, 0);
/* Delete sub-groups */
for (const Group *gp : Group::Iterate()) {
if (gp->parent == g->index) {
- DoCommand(0, gp->index, 0, flags, CMD_DELETE_GROUP);
+ DoCommand(flags, CMD_DELETE_GROUP, 0, gp->index, 0);
}
}
@@ -580,7 +580,7 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32
/* For each shared vehicles add it to the group */
for (Vehicle *v2 = v->FirstShared(); v2 != nullptr; v2 = v2->NextShared()) {
- if (v2->group_id != id_g) DoCommand(tile, id_g, v2->index, flags, CMD_ADD_VEHICLE_GROUP, text);
+ if (v2->group_id != id_g) DoCommand(flags, CMD_ADD_VEHICLE_GROUP, tile, id_g, v2->index, text);
}
}
}
@@ -616,7 +616,7 @@ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint3
if (v->group_id != old_g) continue;
/* Add The Vehicle to the default group */
- DoCommand(tile, DEFAULT_GROUP, v->index, flags, CMD_ADD_VEHICLE_GROUP, text);
+ DoCommand(flags, CMD_ADD_VEHICLE_GROUP, tile, DEFAULT_GROUP, v->index, text);
}
}