summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-18 18:19:49 +0000
committertron <tron@openttd.org>2004-12-18 18:19:49 +0000
commitb9779176d5b7ed3277e5d23317c1511a417b04a4 (patch)
treeebd4121faedb6ef9e4644900f0d2dad003d1dca3
parentc7b5cc37876d9a6c87f9d4551e2c2df173e28bd1 (diff)
downloadopenttd-b9779176d5b7ed3277e5d23317c1511a417b04a4.tar.xz
(svn r1161) Don't make redundant GetAirport() calls, use the cached value
-rw-r--r--station_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 977693a9a..4ce56ea54 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1682,8 +1682,7 @@ END_TILE_LOOP(tile_cur, w,h,tile)
uint i;
for (i = 0; i < afc->nof_depots; ++i)
- DeleteWindowById(WC_VEHICLE_DEPOT,
- tile + GetAirport(st->airport_type)->airport_depots[i]);
+ DeleteWindowById(WC_VEHICLE_DEPOT, tile + afc->airport_depots[i]);
st->airport_tile = 0;
st->facilities &= ~FACIL_AIRPORT;