diff options
-rw-r--r-- | src/engine_gui.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index 3ac261d15..0e5324868 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -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) |