Cleanup: Replace FOR_ALL_SORTED_CARGOSPECS macro with range iterator.

This commit is contained in:
Peter Nelson
2021-04-28 21:50:46 +01:00
committed by PeterN
parent de81afdf4b
commit 20ac0b4148
4 changed files with 3 additions and 12 deletions

View File

@@ -1171,8 +1171,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
CargoTypes cmask = args->GetInt64(SCC_CARGO_LIST);
bool first = true;
const CargoSpec *cs;
FOR_ALL_SORTED_CARGOSPECS(cs) {
for (const auto &cs : _sorted_cargo_specs) {
if (!HasBit(cmask, cs->Index())) continue;
if (buff >= last - 2) break; // ',' and ' '