diff options
author | frosch <frosch@openttd.org> | 2009-10-06 19:17:07 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-10-06 19:17:07 +0000 |
commit | f3aacb8fe3e96efd90b0ab93dbf8fb33a8842434 (patch) | |
tree | 373048e110915c31097d4e056da5f54833620492 /src/vehicle_gui.cpp | |
parent | 95dfee1c604d420df9f0d5860fcddf29e657fc32 (diff) | |
download | openttd-f3aacb8fe3e96efd90b0ab93dbf8fb33a8842434.tar.xz |
(svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 9184e778d..fc1e4abb3 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -161,8 +161,9 @@ static RefitList *BuildRefitList(const Vehicle *v) uint i; do { - uint32 cmask = EngInfo(u->engine_type)->refit_mask; - byte callback_mask = EngInfo(u->engine_type)->callback_mask; + const Engine *e = Engine::Get(u->engine_type); + uint32 cmask = e->info.refit_mask; + byte callback_mask = e->info.callback_mask; /* Skip this engine if it has no capacity */ if (u->cargo_cap == 0) continue; |