From 5eddbb338b7838c01087921c77c0738fc12cbfb2 Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 13 Apr 2013 13:42:08 +0000 Subject: (svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen) --- src/script/api/script_station.cpp | 2 +- src/script/api/script_vehicle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script') diff --git a/src/script/api/script_station.cpp b/src/script/api/script_station.cpp index a7b8459fc..bcf5e08ce 100644 --- a/src/script/api/script_station.cpp +++ b/src/script/api/script_station.cpp @@ -41,7 +41,7 @@ if (!IsValidStation(station_id)) return -1; if (!ScriptCargo::IsValidCargo(cargo_id)) return -1; - return ::Station::Get(station_id)->goods[cargo_id].cargo.Count(); + return ::Station::Get(station_id)->goods[cargo_id].cargo.TotalCount(); } /* static */ bool ScriptStation::HasCargoRating(StationID station_id, CargoID cargo_id) diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index 5bbcd543a..84cfc99fc 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -399,7 +399,7 @@ uint32 amount = 0; for (const Vehicle *v = ::Vehicle::Get(vehicle_id); v != NULL; v = v->Next()) { - if (v->cargo_type == cargo) amount += v->cargo.Count(); + if (v->cargo_type == cargo) amount += v->cargo.StoredCount(); } return amount; -- cgit v1.2.3-54-g00ecf