summaryrefslogtreecommitdiff
path: root/src/bridge_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/bridge_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/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index abd1f3da5..e9e1f48f5 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -119,8 +119,8 @@ private:
case TRANSPORT_ROAD: _last_roadbridge_type = this->bridges->at(i).index; break;
default: break;
}
- DoCommandP(CMD_BUILD_BRIDGE, STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, CcBuildBridge,
- this->end_tile, this->start_tile, this->type | this->bridges->at(i).index);
+ Command<CMD_BUILD_BRIDGE>::Post(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, CcBuildBridge,
+ this->end_tile, this->start_tile, this->type | this->bridges->at(i).index, {});
}
/** Sort the builable bridges */
@@ -385,7 +385,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
default: break; // water ways and air routes don't have bridge types
}
if (_ctrl_pressed && CheckBridgeAvailability(last_bridge_type, bridge_len).Succeeded()) {
- DoCommandP(CMD_BUILD_BRIDGE, STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, CcBuildBridge, end, start, type | last_bridge_type);
+ Command<CMD_BUILD_BRIDGE>::Post(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, CcBuildBridge, end, start, type | last_bridge_type, {});
return;
}