diff options
author | frosch <frosch@openttd.org> | 2011-11-01 00:23:41 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-11-01 00:23:41 +0000 |
commit | acc3c75951c4db0873db794b657697774f0ff9e9 (patch) | |
tree | 2b7e5f953286b09c3c07688c9e8c49ee953c5adb /src/articulated_vehicles.cpp | |
parent | 72cd855978bf45fd444eae72551a12e13a35b0c8 (diff) | |
download | openttd-acc3c75951c4db0873db794b657697774f0ff9e9.tar.xz |
(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.
Diffstat (limited to 'src/articulated_vehicles.cpp')
-rw-r--r-- | src/articulated_vehicles.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp index f186915b9..8d3932ce2 100644 --- a/src/articulated_vehicles.cpp +++ b/src/articulated_vehicles.cpp @@ -37,7 +37,8 @@ static EngineID GetNextArticulatedPart(uint index, EngineID front_type, Vehicle if (callback == CALLBACK_FAILED || GB(callback, 0, 8) == 0xFF) return INVALID_ENGINE; if (mirrored != NULL) *mirrored = HasBit(callback, 7); - return GetNewEngineID(GetEngineGRF(front_type), Engine::Get(front_type)->type, GB(callback, 0, 7)); + const Engine *front_engine = Engine::Get(front_type); + return GetNewEngineID(front_engine->GetGRF(), front_engine->type, GB(callback, 0, 7)); } /** |