File diff r24481:a5bae7e5e10a → r24482:081733badf2c
src/station_cmd.cpp
Show inline comments
 
@@ -4013,7 +4013,7 @@ static bool CanMoveGoodsToStation(const 
 
	return true;
 
}
 

	
 
uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, SourceID source_id, const StationList *all_stations)
 
uint MoveGoodsToStation(CargoID type, uint amount, SourceType source_type, SourceID source_id, const StationList *all_stations, Owner exclusivity)
 
{
 
	/* Return if nothing to do. Also the rounding below fails for 0. */
 
	if (all_stations->empty()) return 0;
 
@@ -4024,6 +4024,7 @@ uint MoveGoodsToStation(CargoID type, ui
 
	std::vector<StationInfo> used_stations;
 

	
 
	for (Station *st : *all_stations) {
 
		if (exclusivity != INVALID_OWNER && exclusivity != st->owner) continue;
 
		if (!CanMoveGoodsToStation(st, type)) continue;
 

	
 
		/* Avoid allocating a vector if there is only one station to significantly