Fix: do not hide parameter by local variable with the same name
This commit is contained in:
@@ -498,16 +498,16 @@ static void ShowRejectOrAcceptNews(const Station *st, uint num_items, CargoID *c
|
||||
|
||||
/**
|
||||
* Get the cargo types being produced around the tile (in a rectangle).
|
||||
* @param tile Northtile of area
|
||||
* @param north_tile Northern most tile of area
|
||||
* @param w X extent of the area
|
||||
* @param h Y extent of the area
|
||||
* @param rad Search radius in addition to the given area
|
||||
*/
|
||||
CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad)
|
||||
CargoArray GetProductionAroundTiles(TileIndex north_tile, int w, int h, int rad)
|
||||
{
|
||||
CargoArray produced;
|
||||
std::set<IndustryID> industries;
|
||||
TileArea ta = TileArea(tile, w, h).Expand(rad);
|
||||
TileArea ta = TileArea(north_tile, w, h).Expand(rad);
|
||||
|
||||
/* Loop over all tiles to get the produced cargo of
|
||||
* everything except industries */
|
||||
@@ -535,19 +535,19 @@ CargoArray GetProductionAroundTiles(TileIndex tile, int w, int h, int rad)
|
||||
|
||||
/**
|
||||
* Get the acceptance of cargoes around the tile in 1/8.
|
||||
* @param tile Center of the search area
|
||||
* @param center_tile Center of the search area
|
||||
* @param w X extent of area
|
||||
* @param h Y extent of area
|
||||
* @param rad Search radius in addition to given area
|
||||
* @param always_accepted bitmask of cargo accepted by houses and headquarters; can be nullptr
|
||||
* @param ind Industry associated with neutral station (e.g. oil rig) or nullptr
|
||||
*/
|
||||
CargoArray GetAcceptanceAroundTiles(TileIndex tile, int w, int h, int rad, CargoTypes *always_accepted)
|
||||
CargoArray GetAcceptanceAroundTiles(TileIndex center_tile, int w, int h, int rad, CargoTypes *always_accepted)
|
||||
{
|
||||
CargoArray acceptance;
|
||||
if (always_accepted != nullptr) *always_accepted = 0;
|
||||
|
||||
TileArea ta = TileArea(tile, w, h).Expand(rad);
|
||||
TileArea ta = TileArea(center_tile, w, h).Expand(rad);
|
||||
|
||||
for (TileIndex tile : ta) {
|
||||
/* Ignore industry if it has a neutral station. */
|
||||
|
Reference in New Issue
Block a user