summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-27 06:57:24 +0000
committertron <tron@openttd.org>2005-06-27 06:57:24 +0000
commit5cbd8b598ced72ad2756c40d3c4fc15a9f247fc9 (patch)
tree25912342dc104ba143e6030a35c59234dac9aef9 /aircraft_gui.c
parent48ff5e39dc523dcfd448006ab3232599e2792178 (diff)
downloadopenttd-5cbd8b598ced72ad2756c40d3c4fc15a9f247fc9.tar.xz
(svn r2492) Remove some pointless casts and fix some nearby indentation
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 2fd970443..df8ba122d 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -641,7 +641,7 @@ static void DrawAircraftDepotWindow(Window *w)
num = 0;
FOR_ALL_VEHICLES(v) {
if (v->type == VEH_Aircraft && v->subtype <= 2 && v->vehstatus&VS_HIDDEN &&
- v->tile == (TileIndex)tile)
+ v->tile == tile)
num++;
}
SetVScrollCount(w, (num + w->hscroll.cap - 1) / w->hscroll.cap);
@@ -657,7 +657,7 @@ static void DrawAircraftDepotWindow(Window *w)
if (v->type == VEH_Aircraft &&
v->subtype <= 2 &&
v->vehstatus&VS_HIDDEN &&
- v->tile == (TileIndex)tile &&
+ v->tile == tile &&
--num < 0 && num >= -w->vscroll.cap * w->hscroll.cap) {
DrawAircraftImage(v, x+12, y, WP(w,traindepot_d).sel);
@@ -695,20 +695,14 @@ static int GetVehicleFromAircraftDepotWndPt(Window *w, int x, int y, Vehicle **v
tile = w->window_number;
FOR_ALL_VEHICLES(v) {
- if (v->type == VEH_Aircraft &&
- v->subtype <= 2 &&
- v->vehstatus&VS_HIDDEN &&
- v->tile == (TileIndex)tile &&
+ if (v->type == VEH_Aircraft && v->subtype <= 2 &&
+ v->vehstatus & VS_HIDDEN && v->tile == tile &&
--pos < 0) {
- *veh = v;
- if (xm >= 12)
- return 0;
-
- if (ym <= 12)
- return -1; /* show window */
-
- return -2; /* start stop */
- }
+ *veh = v;
+ if (xm >= 12) return 0;
+ if (ym <= 12) return -1; /* show window */
+ return -2; /* start stop */
+ }
}
return 1; /* outside */
}