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.
This commit is contained in:
Michael Lutz
2021-10-31 19:39:09 +01:00
parent e740c24eb7
commit 0f64ee5ce1
47 changed files with 375 additions and 332 deletions

View File

@@ -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();