Change FOR_ALL_ cycles to ::Iterate

This commit is contained in:
dP
2020-01-06 20:45:47 +03:00
parent 1492a22027
commit 47b70f6769
16 changed files with 39 additions and 54 deletions
+1 -2
View File
@@ -951,8 +951,7 @@ static void DoRegularAdvertising(Town *t) {
if (t->ad_ref_goods_entry == NULL) {
// Pick as ref station and cargo with min rating
const Station *st;
FOR_ALL_STATIONS(st) {
for (Station *st : Station::Iterate()) {
if (st->owner == _local_company && DistanceManhattan(t->xy, st->xy) <= 20) {
for (CargoID i = 0; i < NUM_CARGO; i++)
if (st->goods[i].HasRating() && (t->ad_ref_goods_entry == NULL ||