diff options
author | frosch <frosch@openttd.org> | 2009-06-27 21:36:04 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-06-27 21:36:04 +0000 |
commit | 1e09854cb7484a0317de81d412c6a541a96dacb6 (patch) | |
tree | 5d8389a9efbf993b4e39c605d7aa0d5024b6d581 /src/autoreplace_cmd.cpp | |
parent | a288e4d82ff85819aa49061d66ee7e0cfd87e802 (diff) | |
download | openttd-1e09854cb7484a0317de81d412c6a541a96dacb6.tar.xz |
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 183284dac..e7fb28458 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -182,7 +182,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool /* Now we found a cargo type being carried on the train and we will see if it is possible to carry to this one */ if (HasBit(available_cargo_types, v->cargo_type)) { /* Do we have to refit the vehicle, or is it already carrying the right cargo? */ - uint16 *default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); + CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); for (CargoID cid = 0; cid < NUM_CARGO; cid++) { if (cid != v->cargo_type && default_capacity[cid] > 0) return v->cargo_type; } @@ -198,7 +198,7 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool if (part_of_chain && !VerifyAutoreplaceRefitForOrders(v, engine_type)) return CT_INVALID; // Some refit orders lose their effect /* Do we have to refit the vehicle, or is it already carrying the right cargo? */ - uint16 *default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); + CargoArray default_capacity = GetCapacityOfArticulatedParts(engine_type, v->type); for (CargoID cid = 0; cid < NUM_CARGO; cid++) { if (cid != cargo_type && default_capacity[cid] > 0) return cargo_type; } |