summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-04-13 13:42:08 +0000
committerfrosch <frosch@openttd.org>2013-04-13 13:42:08 +0000
commit5eddbb338b7838c01087921c77c0738fc12cbfb2 (patch)
treee1d1b917bc00b6e7e43aad49188c98b635887b12 /src/train_gui.cpp
parent8d1d521456c57b69243853b369ecc60de0421e33 (diff)
downloadopenttd-5eddbb338b7838c01087921c77c0738fc12cbfb2.tar.xz
(svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen)
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index f302d759c..866eab745 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -276,7 +276,7 @@ static void GetCargoSummaryOfArticulatedVehicle(const Train *v, CargoSummary *su
}
item->capacity += v->cargo_cap;
- item->amount += v->cargo.Count();
+ item->amount += v->cargo.StoredCount();
if (item->source == INVALID_STATION) item->source = v->cargo.Source();
} while ((v = v->Next()) != NULL && v->IsArticulatedPart());
}
@@ -311,7 +311,7 @@ int GetTrainDetailsWndVScroll(VehicleID veh_id, TrainDetailsWindowTabs det_tab)
CargoArray act_cargo;
CargoArray max_cargo;
for (const Vehicle *v = Vehicle::Get(veh_id); v != NULL; v = v->Next()) {
- act_cargo[v->cargo_type] += v->cargo.Count();
+ act_cargo[v->cargo_type] += v->cargo.StoredCount();
max_cargo[v->cargo_type] += v->cargo_cap;
}
@@ -424,7 +424,7 @@ void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_po
Money feeder_share = 0;
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
- act_cargo[u->cargo_type] += u->cargo.Count();
+ act_cargo[u->cargo_type] += u->cargo.StoredCount();
max_cargo[u->cargo_type] += u->cargo_cap;
feeder_share += u->cargo.FeederShare();
}