forked from mirror/OpenTTD
(svn r15073) -Fix (r15067) [FS#2532]: Default copy constructors don't necessarily do what you want. Instead of creating one, we now pass a pointer around as that avoids additional allocations.
This commit is contained in:
@@ -1992,7 +1992,8 @@ static void CanCargoServiceIndustry(CargoID cargo, Industry *ind, bool *c_accept
|
||||
int WhoCanServiceIndustry(Industry *ind)
|
||||
{
|
||||
/* Find all stations within reach of the industry */
|
||||
StationList stations = FindStationsAroundTiles(ind->xy, ind->width, ind->height);
|
||||
StationList stations;
|
||||
FindStationsAroundTiles(ind->xy, ind->width, ind->height, &stations);
|
||||
|
||||
if (stations.Length() == 0) return 0; // No stations found at all => nobody services
|
||||
|
||||
|
Reference in New Issue
Block a user