Remove unused Vehicle capacity methods

Remove unused methods Vehicle::GetConsistFreeCapacities and
Vehicle::GetConsistTotalCapacity.

(cherry picked from commit d97442878f9856c253a3bf976b6a3e114faebefe)
This commit is contained in:
cirdan
2016-03-05 15:24:32 +01:00
committed by Jonathan G Rennison
parent 25bd3ed6f4
commit ca98e78c69
2 changed files with 0 additions and 32 deletions

View File

@@ -2663,34 +2663,6 @@ void Vehicle::HandleWaiting(bool stop_waiting)
}
}
/**
* Get a map of cargoes and free capacities in the consist.
* @param capacities Map to be filled with cargoes and capacities.
*/
void Vehicle::GetConsistFreeCapacities(SmallMap<CargoID, uint> &capacities) const
{
for (const Vehicle *v = this; v != NULL; v = v->Next()) {
if (v->cargo_cap == 0) continue;
SmallPair<CargoID, uint> *pair = capacities.Find(v->cargo_type);
if (pair == capacities.End()) {
pair = capacities.Append();
pair->first = v->cargo_type;
pair->second = v->cargo_cap - v->cargo.StoredCount();
} else {
pair->second += v->cargo_cap - v->cargo.StoredCount();
}
}
}
uint Vehicle::GetConsistTotalCapacity() const
{
uint result = 0;
for (const Vehicle *v = this; v != NULL; v = v->Next()) {
result += v->cargo_cap;
}
return result;
}
/**
* Send this vehicle to the depot using the given command(s).
* @param flags the command flags (like execute and such).