Cleanup: Replace FOR_ALL_SORTED_CARGOSPECS macro with range iterator.

(cherry picked from commit 20ac0b4148)
This commit is contained in:
Peter Nelson
2021-04-28 21:50:46 +01:00
committed by Jonathan G Rennison
parent 5e1b4e1844
commit 4fc433c871
4 changed files with 3 additions and 12 deletions

View File

@@ -746,8 +746,7 @@ struct RefitWindow : public Window {
/* Loop through all cargoes in the refit mask */
int current_index = 0;
const CargoSpec *cs;
FOR_ALL_SORTED_CARGOSPECS(cs) {
for (const auto &cs : _sorted_cargo_specs) {
CargoID cid = cs->Index();
/* Skip cargo type if it's not listed */
if (!HasBit(cmask, cid)) {