diff options
author | peter1138 <peter1138@openttd.org> | 2019-02-24 19:16:24 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-09 16:33:47 +0000 |
commit | 94b40fd530f8ef348434d14a1c85fde66e25c98a (patch) | |
tree | 0c9bdb846d86e484077cf4d997422567b7599246 /src/subsidy.cpp | |
parent | ed6084523d546641d4ec9ff5f560387d7c40670f (diff) | |
download | openttd-94b40fd530f8ef348434d14a1c85fde66e25c98a.tar.xz |
Codechange: Convert IndustryVector to a std::set.
Diffstat (limited to 'src/subsidy.cpp')
-rw-r--r-- | src/subsidy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/subsidy.cpp b/src/subsidy.cpp index d1fda0f0a..1b375d215 100644 --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -596,9 +596,9 @@ bool CheckSubsidised(CargoID cargo_type, CompanyID company, SourceType src_type, if (s->cargo_type == cargo_type && s->src_type == src_type && s->src == src && (!s->IsAwarded() || s->awarded == company)) { switch (s->dst_type) { case ST_INDUSTRY: - for (const Industry * const *ip = st->industries_near.Begin(); ip != st->industries_near.End(); ip++) { - if (s->dst == (*ip)->index) { - assert((*ip)->part_of_subsidy & POS_DST); + for (Industry *ind : st->industries_near) { + if (s->dst == ind->index) { + assert(ind->part_of_subsidy & POS_DST); subsidised = true; if (!s->IsAwarded()) s->AwardTo(company); } |