summaryrefslogtreecommitdiff
path: root/src/dock_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-30 01:31:46 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commite740c24eb7a90bc771f5976d64d80639ee7576e5 (patch)
treeb3c8f0c87419cb11c106ba1cb58d6ae0648beef4 /src/dock_gui.cpp
parentc88b104ec662ea80bec89f58aa7ad9d0baac7704 (diff)
downloadopenttd-e740c24eb7a90bc771f5976d64d80639ee7576e5.tar.xz
Codechange: Template DoCommand 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/dock_gui.cpp')
-rw-r--r--src/dock_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index da7e0518f..571bfdcec 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -215,7 +215,7 @@ struct BuildDocksToolbarWindow : Window {
auto proc = [=](bool test, StationID to_join) -> bool {
if (test) {
- return DoCommand(CommandFlagsToDCFlags(GetCommandFlags(CMD_BUILD_DOCK)), CMD_BUILD_DOCK, tile, p1, p2).Succeeded();
+ return Command<CMD_BUILD_DOCK>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_DOCK>()), tile, p1, p2, {}).Succeeded();
} else {
uint32 p2_final = p2;
if (to_join != INVALID_STATION) SB(p2_final, 16, 16, to_join);