diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-31 19:39:09 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch) | |
tree | 161f0e6ac300e604de61b8203b5a58279637f9eb /src/engine_gui.cpp | |
parent | e740c24eb7a90bc771f5976d64d80639ee7576e5 (diff) | |
download | openttd-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/engine_gui.cpp')
-rw-r--r-- | src/engine_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 6710967f4..c3b9553a7 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -23,6 +23,7 @@ #include "roadveh.h" #include "ship.h" #include "aircraft.h" +#include "engine_cmd.h" #include "widgets/engine_widget.h" @@ -125,7 +126,7 @@ struct EnginePreviewWindow : Window { { switch (widget) { case WID_EP_YES: - DoCommandP(CMD_WANT_ENGINE_PREVIEW, 0, this->window_number, 0); + Command<CMD_WANT_ENGINE_PREVIEW>::Post(0, this->window_number, 0, {}); FALLTHROUGH; case WID_EP_NO: if (!_shift_pressed) this->Close(); |