Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops

This commit is contained in:
glx22
2021-04-29 17:51:05 +02:00
committed by Loïc Guilloux
parent 14e92bd8e2
commit 9a8756d7ed
8 changed files with 53 additions and 25 deletions

View File

@@ -3467,8 +3467,7 @@ static void UpdateStationRating(Station *st)
byte_inc_sat(&st->time_since_load);
byte_inc_sat(&st->time_since_unload);
const CargoSpec *cs;
FOR_ALL_CARGOSPECS(cs) {
for (const CargoSpec *cs : CargoSpec::Iterate()) {
GoodsEntry *ge = &st->goods[cs->Index()];
/* Slowly increase the rating back to his original level in the case we
* didn't deliver cargo yet to this station. This happens when a bribe