diff options
author | tron <tron@openttd.org> | 2006-08-14 20:25:29 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-14 20:25:29 +0000 |
commit | ba146839129e30f122fe247cdc052166d8edc08a (patch) | |
tree | 22316d8ec4aa0a3bc1a32f91568adc623e6c4b9a /roadveh_gui.c | |
parent | abe5e04ddabe43ef019f95ebd5f41faef2886af1 (diff) | |
download | openttd-ba146839129e30f122fe247cdc052166d8edc08a.tar.xz |
(svn r5894) Remove a totally unnecessary indirection in the vehicle sorter code. Less code, less data, simply better
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r-- | roadveh_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c index 1716c3556..f047cd93a 100644 --- a/roadveh_gui.c +++ b/roadveh_gui.c @@ -986,7 +986,7 @@ static void PlayerRoadVehWndProc(Window *w, WindowEvent *e) max = min(w->vscroll.pos + w->vscroll.cap, vl->list_length); for (i = w->vscroll.pos; i < max; ++i) { - Vehicle *v = GetVehicle(vl->sort_list[i].index); + const Vehicle* v = vl->sort_list[i]; StringID str; assert(v->type == VEH_Road && v->owner == owner); @@ -1037,7 +1037,7 @@ static void PlayerRoadVehWndProc(Window *w, WindowEvent *e) if (id_v >= vl->list_length) return; // click out of list bound - v = GetVehicle(vl->sort_list[id_v].index); + v = vl->sort_list[id_v]; assert(v->type == VEH_Road && v->owner == owner); |