summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-01-13 18:18:53 +0000
committerpeter1138 <peter1138@openttd.org>2009-01-13 18:18:53 +0000
commit02bda12599ced659e5e3ff9404ff21f0ca718cd1 (patch)
treeae7816db55022acd80a77f5e646ba906e2ee9762 /src/industry_cmd.cpp
parente1f64922c5acb3f2173108ca81b656266bb8b651 (diff)
downloadopenttd-02bda12599ced659e5e3ff9404ff21f0ca718cd1.tar.xz
(svn r15067) -Fix [FS#2531]: Possible compiler bug, alleviated by using SmallVector instead of using std::set. SmallVector does everything needed anyway.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index e752976fe..5fd794275 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1992,9 +1992,9 @@ static void CanCargoServiceIndustry(CargoID cargo, Industry *ind, bool *c_accept
int WhoCanServiceIndustry(Industry *ind)
{
/* Find all stations within reach of the industry */
- StationSet stations = FindStationsAroundTiles(ind->xy, ind->width, ind->height);
+ StationList stations = FindStationsAroundTiles(ind->xy, ind->width, ind->height);
- if (stations.size() == 0) return 0; // No stations found at all => nobody services
+ if (stations.Length() == 0) return 0; // No stations found at all => nobody services
const Vehicle *v;
int result = 0;
@@ -2030,7 +2030,7 @@ int WhoCanServiceIndustry(Industry *ind)
/* Same cargo produced by industry is dropped here => not serviced by vehicle v */
if ((o->GetUnloadType() & OUFB_UNLOAD) && !c_accepts) break;
- if (stations.find(st) != stations.end()) {
+ if (stations.Contains(st)) {
if (v->owner == _local_company) return 2; // Company services industry
result = 1; // Competitor services industry
}