summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-07 19:10:19 +0000
committerbjarni <bjarni@openttd.org>2007-02-07 19:10:19 +0000
commit037d6367349afa5a27ddf2cf015f6490167cf786 (patch)
treeb16bae58b03b0c68fe0ab88a8311dd7f6406238a /src/autoreplace_gui.cpp
parent5666d8d7272ff24116049757dc2405b55cfd4b97 (diff)
downloadopenttd-037d6367349afa5a27ddf2cf015f6490167cf786.tar.xz
(svn r8621) -Codechange: assigned new numbers to the VEH_(type) enum so that VEH_Train is 0, VEH_Road is 1 and so on
This means that "v->type" can be used as array indexes instead of VehTypeToIndex() (or "v->type - VEH_Train/0x10 as the code still used in some places) Surprisingly this can be done without changing the savegame format
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 89f347438..95c23d83f 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -251,7 +251,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e)
!EngineHasReplacementForPlayer(p, selected_id[0]));
/* now the actual drawing of the window itself takes place */
- SetDParam(0, _vehicle_type_names[VehTypeToIndex(w->window_number)]);
+ SetDParam(0, _vehicle_type_names[w->window_number]);
if (w->window_number == VEH_Train) {
/* set on/off for renew_keep_length */