# HG changeset patch # User Peter Nelson # Date 2023-05-23 16:19:38 # Node ID 504cdf94e1e60479dc4a69ac593cca82e303de7d # Parent 6a028979ce01a2f51d68b52ac5565ca69b493c21 Cleanup: No need to cound actual cargo to get scroll count. diff --git a/src/train_gui.cpp b/src/train_gui.cpp --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -322,10 +322,8 @@ int GetTrainDetailsWndVScroll(VehicleID 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; }