mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(svn r26848) -Codechange: Unduplicate summing of cargo capacities in GetTotalCapacityOfArticulatedParts.
This commit is contained in:
parent
dfbcd8869d
commit
4ff3ab1357
@ -142,14 +142,8 @@ void ShowEnginePreviewWindow(EngineID engine)
|
||||
*/
|
||||
uint GetTotalCapacityOfArticulatedParts(EngineID engine)
|
||||
{
|
||||
uint total = 0;
|
||||
|
||||
CargoArray cap = GetCapacityOfArticulatedParts(engine);
|
||||
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||
total += cap[c];
|
||||
}
|
||||
|
||||
return total;
|
||||
return cap.GetSum<uint>();
|
||||
}
|
||||
|
||||
static StringID GetTrainEngineInfoString(const Engine *e)
|
||||
|
Loading…
Reference in New Issue
Block a user