diff options
author | Peter Nelson <peter1138@openttd.org> | 2021-04-28 21:50:46 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2021-04-28 23:54:31 +0100 |
commit | 20ac0b41484ebcaef3f8bdc9d4410903fd499386 (patch) | |
tree | 2bb5c52a372de305061dd544303052bda8a75980 /src/vehicle_gui.cpp | |
parent | de81afdf4bfb97a48533489101e3aa0e5eb2cb4f (diff) | |
download | openttd-20ac0b41484ebcaef3f8bdc9d4410903fd499386.tar.xz |
Cleanup: Replace FOR_ALL_SORTED_CARGOSPECS macro with range iterator.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index f4b518586..c6f2ee52a 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -513,8 +513,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)) { |