summaryrefslogtreecommitdiff
path: root/src/terraform_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/terraform_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/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 498d057aa..71d897c3d 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -34,6 +34,7 @@
#include "terraform_cmd.h"
#include "zoom_func.h"
#include "rail_cmd.h"
+#include "landscape_cmd.h"
#include "widgets/terraform_widget.h"
@@ -513,7 +514,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
/* Delete all station signs */
for (BaseStation *st : BaseStation::Iterate()) {
/* There can be buoys, remove them */
- if (IsBuoyTile(st->xy)) DoCommand(DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR, st->xy, 0, 0);
+ if (IsBuoyTile(st->xy)) Command<CMD_LANDSCAPE_CLEAR>::Do(DC_EXEC | DC_BANKRUPT, st->xy, 0, 0, {});
if (!st->IsInUse()) delete st;
}