Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
This commit is contained in:
@@ -2353,32 +2353,6 @@ void Vehicle::HandleLoading(bool mode)
|
||||
this->IncrementImplicitOrderIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a map of cargoes and free capacities in the consist.
|
||||
* @param capacities Map to be filled with cargoes and capacities.
|
||||
*/
|
||||
void Vehicle::GetConsistFreeCapacities(std::map<CargoID, uint> &capacities) const
|
||||
{
|
||||
for (const Vehicle *v = this; v != nullptr; v = v->Next()) {
|
||||
if (v->cargo_cap == 0) continue;
|
||||
auto pair = capacities.find(v->cargo_type);
|
||||
if (pair == capacities.end()) {
|
||||
capacities[v->cargo_type] = 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 != nullptr; 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).
|
||||
|
Reference in New Issue
Block a user