Skip to content

Commit

Permalink
Codechange: Make FindStationsAroundTile() out-parameter stations cons…
Browse files Browse the repository at this point in the history
…t to prevent incorrect modification.
  • Loading branch information
PeterN committed Mar 13, 2019
1 parent 6b92b83 commit b00a861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/station_cmd.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3820,10 +3820,10 @@ static void AddNearbyStationsByCatchment(TileIndex tile, StationList *stations,
* Find all stations around a rectangular producer (industry, house, headquarter, ...) * Find all stations around a rectangular producer (industry, house, headquarter, ...)
* *
* @param location The location/area of the producer * @param location The location/area of the producer
* @param stations The list to store the stations in * @param[out] stations The list to store the stations in
* @param use_nearby Use nearby station list of industry/town associated with location.tile * @param use_nearby Use nearby station list of industry/town associated with location.tile
*/ */
void FindStationsAroundTiles(const TileArea &location, StationList *stations, bool use_nearby) void FindStationsAroundTiles(const TileArea &location, StationList * const stations, bool use_nearby)
{ {
if (use_nearby) { if (use_nearby) {
/* Industries and towns maintain a list of nearby stations */ /* Industries and towns maintain a list of nearby stations */
Expand Down

0 comments on commit b00a861

Please sign in to comment.