summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-31 19:39:09 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch)
tree161f0e6ac300e604de61b8203b5a58279637f9eb /src/train_gui.cpp
parente740c24eb7a90bc771f5976d64d80639ee7576e5 (diff)
downloadopenttd-0f64ee5ce1548d9cda69917f27c5b1a3cb91823d.tar.xz
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 7031a8968..8fc97d857 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -14,6 +14,7 @@
#include "strings_func.h"
#include "vehicle_func.h"
#include "zoom_func.h"
+#include "train_cmd.h"
#include "table/strings.h"
@@ -45,7 +46,7 @@ void CcBuildWagon(const CommandCost &result, Commands cmd, TileIndex tile, uint3
if (found != nullptr) {
found = found->Last();
/* put the new wagon at the end of the loco. */
- DoCommandP(CMD_MOVE_RAIL_VEHICLE, 0, _new_vehicle_id, found->index);
+ Command<CMD_MOVE_RAIL_VEHICLE>::Post(0, _new_vehicle_id, found->index, {});
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
}
}