@ -2940,9 +2940,9 @@ CommandCost CmdRenameStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
*
*
* @ return : Set of found stations
* @ return : Set of found stations
*/
*/
Station Se t FindStationsAroundTiles ( TileIndex tile , int w_prod , int h_prod )
Station Lis t FindStationsAroundTiles ( TileIndex tile , int w_prod , int h_prod )
{
{
Station Set station_set ;
Station List stations ;
/* area to search = producer plus station catchment radius */
/* area to search = producer plus station catchment radius */
int max_rad = ( _settings_game . station . modified_catchment ? MAX_CATCHMENT : CA_UNMODIFIED ) ;
int max_rad = ( _settings_game . station . modified_catchment ? MAX_CATCHMENT : CA_UNMODIFIED ) ;
@ -2989,11 +2989,11 @@ StationSet FindStationsAroundTiles(TileIndex tile, int w_prod, int h_prod)
/* Insert the station in the set. This will fail if it has
/* Insert the station in the set. This will fail if it has
* already been added .
* already been added .
*/
*/
station _set. insert ( st ) ;
station s. Include ( st ) ;
END_TILE_LOOP ( cur_tile , w , h , tile - TileDiffXY ( max_rad , max_rad ) )
END_TILE_LOOP ( cur_tile , w , h , tile - TileDiffXY ( max_rad , max_rad ) )
return station _ set ;
return station s;
}
}
uint MoveGoodsToStation ( TileIndex tile , int w , int h , CargoID type , uint amount )
uint MoveGoodsToStation ( TileIndex tile , int w , int h , CargoID type , uint amount )
@ -3003,8 +3003,8 @@ uint MoveGoodsToStation(TileIndex tile, int w, int h, CargoID type, uint amount)
uint best_rating1 = 0 ; // rating of st1
uint best_rating1 = 0 ; // rating of st1
uint best_rating2 = 0 ; // rating of st2
uint best_rating2 = 0 ; // rating of st2
Station Se t all_stations = FindStationsAroundTiles ( tile , w , h ) ;
Station Lis t all_stations = FindStationsAroundTiles ( tile , w , h ) ;
for ( Station Set: : iterator st_iter = all_stations . b egin( ) ; st_iter ! = all_stations . e nd( ) ; + + st_iter ) {
for ( Station * * st_iter = all_stations . B egin( ) ; st_iter ! = all_stations . E nd( ) ; + + st_iter ) {
Station * st = * st_iter ;
Station * st = * st_iter ;
/* Is the station reserved exclusively for somebody else? */
/* Is the station reserved exclusively for somebody else? */