summaryrefslogtreecommitdiff
path: root/src/subsidy.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-02-24 19:16:24 +0000
committerPeterN <peter@fuzzle.org>2019-03-09 16:33:47 +0000
commit94b40fd530f8ef348434d14a1c85fde66e25c98a (patch)
tree0c9bdb846d86e484077cf4d997422567b7599246 /src/subsidy.cpp
parented6084523d546641d4ec9ff5f560387d7c40670f (diff)
downloadopenttd-94b40fd530f8ef348434d14a1c85fde66e25c98a.tar.xz
Codechange: Convert IndustryVector to a std::set.
Diffstat (limited to 'src/subsidy.cpp')
-rw-r--r--src/subsidy.cpp6
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);
}