diff options
author | frosch <frosch@openttd.org> | 2011-11-01 00:21:08 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-01 00:21:08 +0000 |
commit | 72cd855978bf45fd444eae72551a12e13a35b0c8 (patch) | |
tree | b7f4b3cc07022ba32160f5e67f4cb5a527266d12 /src/vehicle_gui.cpp | |
parent | c366e0d45f87f9ba625ed73cbf5bff61d8483c5c (diff) | |
download | openttd-72cd855978bf45fd444eae72551a12e13a35b0c8.tar.xz |
(svn r23074) -Codechange: Add Vehicle::GetEngine() to simplify code.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index c3cc8dade..2475b9b1b 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -217,8 +217,8 @@ static const uint MAX_REFIT_CYCLE = 256; */ byte GetBestFittingSubType(Vehicle *v_from, Vehicle *v_for) { - const Engine *e_from = Engine::Get(v_from->engine_type); - const Engine *e_for = Engine::Get(v_for->engine_type); + const Engine *e_from = v_from->GetEngine(); + const Engine *e_for = v_for->GetEngine(); /* If one them doesn't carry cargo, there's no need to find a sub type */ if (!e_from->CanCarryCargo() || !e_for->CanCarryCargo()) return 0; @@ -386,7 +386,7 @@ struct RefitWindow : public Window { do { if (v->type == VEH_TRAIN && !vehicles_to_refit.Contains(v->index)) continue; - const Engine *e = Engine::Get(v->engine_type); + const Engine *e = v->GetEngine(); uint32 cmask = e->info.refit_mask; byte callback_mask = e->info.callback_mask; |