(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:
2009-01-13 20:43:53 +00:00
parent dab9de2e61
commit 792d1bd883
4 changed files with 10 additions and 10 deletions

View File

@@ -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