Changeset - r23469:ea7f7b26d1dd
[Not reviewed]
master
0 1 0
peter1138 - 5 years ago 2019-03-13 08:14:15
peter1138@openttd.org
Codechange: Make FindStationsAroundTile() out-parameter stations const to prevent incorrect modification.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -3820,10 +3820,10 @@ static void AddNearbyStationsByCatchment
 
 * Find all stations around a rectangular producer (industry, house, headquarter, ...)
 
 *
 
 * @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
 
 */
 
void FindStationsAroundTiles(const TileArea &location, StationList *stations, bool use_nearby)
 
void FindStationsAroundTiles(const TileArea &location, StationList * const stations, bool use_nearby)
 
{
 
	if (use_nearby) {
 
		/* Industries and towns maintain a list of nearby stations */
0 comments (0 inline, 0 general)