Codechange: Convert StationList from SmallVector to std::set.

This commit is contained in:
peter1138
2019-02-24 18:52:15 +00:00
committed by PeterN
parent 46aca9377b
commit ed6084523d
6 changed files with 17 additions and 11 deletions

View File

@@ -2432,7 +2432,7 @@ static int WhoCanServiceIndustry(Industry *ind)
StationList stations;
FindStationsAroundTiles(ind->location, &stations);
if (stations.Length() == 0) return 0; // No stations found at all => nobody services
if (stations.size() == 0) return 0; // No stations found at all => nobody services
const Vehicle *v;
int result = 0;
@@ -2468,7 +2468,7 @@ static 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.Contains(st)) {
if (stations.find(st) != stations.end()) {
if (v->owner == _local_company) return 2; // Company services industry
result = 1; // Competitor services industry
}