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

View File

@@ -123,7 +123,9 @@
if (!IsValidIndustry(industry_id)) return -1;
Industry *ind = ::GetIndustry(industry_id);
return (int32)::FindStationsAroundTiles(ind->xy, ind->width, ind->height).Length();
StationList stations;
::FindStationsAroundTiles(ind->xy, ind->width, ind->height, &stations);
return (int32)stations.Length();
}
/* static */ int32 AIIndustry::GetDistanceManhattanToTile(IndustryID industry_id, TileIndex tile)