summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-01-13 20:43:53 +0000
committerpeter1138 <peter1138@openttd.org>2009-01-13 20:43:53 +0000
commit792d1bd8835a0ccd8cb13b03338bd2ffd21758fe (patch)
tree4f3979be8f4424ca7b44a2e80ec1de5621a609c9 /src/industry_cmd.cpp
parentdab9de2e61379a1ef6ddcfb07e65ab09d9a370d3 (diff)
downloadopenttd-792d1bd8835a0ccd8cb13b03338bd2ffd21758fe.tar.xz
(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.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 5fd794275..3c3117095 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -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