From 8931e90302e0bc0be8155eaf6b7090c83f26938a Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 23 May 2023 17:19:38 +0100 Subject: [PATCH] Cleanup: No need to cound actual cargo to get scroll count. --- src/train_gui.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/train_gui.cpp b/src/train_gui.cpp index fd8c34f878..76993eb2c3 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -322,10 +322,8 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab) int num = 0; if (det_tab == TDW_TAB_TOTALS) { // Total cargo tab - CargoArray act_cargo{}; CargoArray max_cargo{}; for (const Vehicle *v = Vehicle::Get(veh_id); v != nullptr; v = v->Next()) { - act_cargo[v->cargo_type] += v->cargo.StoredCount(); max_cargo[v->cargo_type] += v->cargo_cap; }