From 2cc2154ad26b96b032df2f4fca0ce1634e6330b2 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 22 Oct 2005 06:39:32 +0000 Subject: (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up --- bridge_gui.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bridge_gui.c') diff --git a/bridge_gui.c b/bridge_gui.c index 1dccbd5f7..ddcc620cb 100644 --- a/bridge_gui.c +++ b/bridge_gui.c @@ -68,7 +68,7 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e) } case WE_CLICK: - if (e->click.widget == 2) { + if (e->click.widget == 2) { uint ind = ((int)e->click.pt.y - 14) / 22; if (ind < 4 && (ind += w->vscroll.pos) < _bridgedata.count) BuildBridge(w, ind); @@ -126,14 +126,13 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type) errmsg = INVALID_STRING_ID; // only query bridge building possibility once, result is the same for all bridges! - // returns CMD_ERROR on failure, and priCe on success + // returns CMD_ERROR on failure, and price on success ret = DoCommandByTile(end, start, (bridge_type << 8), DC_AUTO | DC_QUERY_COST, CMD_BUILD_BRIDGE); if (ret == CMD_ERROR) { errmsg = _error_message; - } - // check which bridges can be built - else { + } else { + // check which bridges can be built int bridge_len; // length of the middle parts of the bridge int tot_bridgedata_len; // total length of bridge @@ -144,7 +143,6 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type) tot_bridgedata_len = CalcBridgeLenCostFactor(tot_bridgedata_len); for (bridge_type = 0; bridge_type != MAX_BRIDGES; bridge_type++) { // loop for all bridgetypes - if (CheckBridge_Stuff(bridge_type, bridge_len)) { const Bridge *b = &_bridge[bridge_type]; // bridge is accepted, add to list -- cgit v1.2.3-70-g09d2