Changeset - r27425:504cdf94e1e6
[Not reviewed]
master
0 1 0
Peter Nelson - 17 months ago 2023-05-23 16:19:38
peter1138@openttd.org
Cleanup: No need to cound actual cargo to get scroll count.
1 file changed with 0 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/train_gui.cpp
Show inline comments
 
@@ -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;
 
		}
 

	
0 comments (0 inline, 0 general)