diff options
author | tron <tron@openttd.org> | 2005-07-19 21:49:35 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-07-19 21:49:35 +0000 |
commit | 7c694f25537097f380d7215082b42eea51e86815 (patch) | |
tree | 02f05ccb111e772991e342a10812e26ae8d1a118 /bridge_gui.c | |
parent | 4b1c5202640d5c741ebdda3b3775a337a1c36be8 (diff) | |
download | openttd-7c694f25537097f380d7215082b42eea51e86815.tar.xz |
(svn r2643) Get rid of some unnecessary casts
Diffstat (limited to 'bridge_gui.c')
-rw-r--r-- | bridge_gui.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bridge_gui.c b/bridge_gui.c index d3273757f..a84a6a2d1 100644 --- a/bridge_gui.c +++ b/bridge_gui.c @@ -10,7 +10,7 @@ #include "sound.h" static struct BridgeData { - int count; + uint count; TileIndex start_tile; TileIndex end_tile; byte type; @@ -40,11 +40,11 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e) { switch(e->event) { case WE_PAINT: { - int i; + uint i; DrawWindowWidgets(w); - for(i=0; i < 4 && i + w->vscroll.pos < _bridge.count; i++) { + for (i = 0; i < 4 && i + w->vscroll.pos < _bridge.count; i++) { int ind = _bridge.indexes[i + w->vscroll.pos]; SetDParam(2, _bridge.costs[i + w->vscroll.pos]); @@ -58,7 +58,7 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e) case WE_KEYPRESS: { uint i = e->keypress.keycode - '1'; - if (i < 9 && i < (uint)_bridge.count) { + if (i < 9 && i < _bridge.count) { e->keypress.cont = false; BuildBridge(w, i); } @@ -69,7 +69,7 @@ static void BuildBridgeWndProc(Window *w, WindowEvent *e) case WE_CLICK: if (e->click.widget == 2) { uint ind = ((int)e->click.pt.y - 14) / 22; - if (ind < 4 && (ind += w->vscroll.pos) < (uint)_bridge.count) + if (ind < 4 && (ind += w->vscroll.pos) < _bridge.count) BuildBridge(w, ind); } break; @@ -112,7 +112,7 @@ static const WindowDesc _build_road_bridge_desc = { void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte bridge_type) { - int j = 0; + uint j = 0; int32 ret; uint16 errmsg; |