diff options
author | belugas <belugas@openttd.org> | 2007-01-30 11:53:35 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-01-30 11:53:35 +0000 |
commit | 0c45071bb018aab652f81b594cffa5b2c4ded0d4 (patch) | |
tree | d001f734f6111d6fe12abd4a122d09903325335c /src/train_gui.cpp | |
parent | e3b63e6d8327b800a2d318d8f30ef72f3b39f33e (diff) | |
download | openttd-0c45071bb018aab652f81b594cffa5b2c4ded0d4.tar.xz |
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r-- | src/train_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 874b9cb55..e5ccddd8a 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -158,7 +158,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e) /* See if any vehicle can be refitted */ for (u = v; u != NULL; u = u->next) { if (EngInfo(u->engine_type)->refit_mask != 0 || - (!(RailVehInfo(v->engine_type)->flags & RVI_WAGON) && v->cargo_cap != 0)) { + (RailVehInfo(v->engine_type)->railveh_type != RAILVEH_WAGON && v->cargo_cap != 0)) { EnableWindowWidget(w, 12); /* We have a refittable carriage, bail out */ break; @@ -341,7 +341,7 @@ static void TrainDetailsCargoTab(const Vehicle *v, int x, int y) static void TrainDetailsInfoTab(const Vehicle *v, int x, int y) { - if (RailVehInfo(v->engine_type)->flags & RVI_WAGON) { + if (RailVehInfo(v->engine_type)->railveh_type == RAILVEH_WAGON) { SetDParam(0, GetCustomEngineName(v->engine_type)); SetDParam(1, v->value); DrawString(x, y, STR_882D_VALUE, 0x10); |