From c21787238cd8f4aed1e7b878bcfc5bf69cc1c339 Mon Sep 17 00:00:00 2001 From: belugas Date: Mon, 11 Feb 2008 04:12:30 +0000 Subject: (svn r12107) -Codechange: Add and use the typedef BridgeType --- src/bridge_gui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/bridge_gui.cpp') diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 11d8ee074..38a576a7e 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -26,7 +26,7 @@ static struct BridgeData { TileIndex start_tile; TileIndex end_tile; uint8 type; - uint8 indexes[MAX_BRIDGES]; + BridgeType indexes[MAX_BRIDGES]; Money costs[MAX_BRIDGES]; BridgeData() @@ -188,14 +188,14 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type) const uint tot_bridgedata_len = CalcBridgeLenCostFactor(bridge_len + 2); /* loop for all bridgetypes */ - for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { - if (CheckBridge_Stuff(bridge_type, bridge_len)) { + for (BridgeType brd_type = 0; brd_type != MAX_BRIDGES; brd_type++) { + if (CheckBridge_Stuff(brd_type, bridge_len)) { /* bridge is accepted, add to list */ - const Bridge *b = GetBridgeSpec(bridge_type); + const Bridge *b = GetBridgeSpec(brd_type); /* Add to terraforming & bulldozing costs the cost of the * bridge itself (not computed with DC_QUERY_COST) */ _bridgedata.costs[j] = ret.GetCost() + (((int64)tot_bridgedata_len * _price.build_bridge * b->price) >> 8); - _bridgedata.indexes[j] = bridge_type; + _bridgedata.indexes[j] = brd_type; j++; } } -- cgit v1.2.3-70-g09d2