summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-28 22:43:38 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit850385465543a9bd589084ec2ac6b0693c481fea (patch)
treefa0d375d36e946caee2c4ebc6a8ecd4e35f33d5b /src/bridge_gui.cpp
parentd85348b1d1b9aa7099255eda7c1058f9749d1003 (diff)
downloadopenttd-850385465543a9bd589084ec2ac6b0693c481fea.tar.xz
Codechange: Pass unpacked command arguments to command callbacks (except Script).
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 77261932b..99628e75c 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -53,15 +53,14 @@ typedef GUIList<BuildBridgeData> GUIBridgeList; ///< List of bridges, used in #B
* @param result Whether the build succeeded
* @param cmd unused
* @param end_tile End tile of the bridge.
- * @param data Additional bitstuffed command data.
+ * @param tile_start start tile
+ * @param transport_type transport type.
*/
-void CcBuildBridge(Commands cmd, const CommandCost &result, TileIndex end_tile, const CommandDataBuffer &data)
+void CcBuildBridge(Commands cmd, const CommandCost &result, TileIndex end_tile, TileIndex tile_start, TransportType transport_type, BridgeType, byte)
{
if (result.Failed()) return;
if (_settings_client.sound.confirm) SndPlayTileFx(SND_27_CONSTRUCTION_BRIDGE, end_tile);
- auto [tile, tile_start, transport_type, bridge_type, road_rail_type] = EndianBufferReader::ToValue<CommandTraits<CMD_BUILD_BRIDGE>::Args>(data);
-
if (transport_type == TRANSPORT_ROAD) {
DiagDirection end_direction = ReverseDiagDir(GetTunnelBridgeDirection(end_tile));
ConnectRoadToStructure(end_tile, end_direction);