summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2021-04-28 21:50:46 +0100
committerPeterN <peter@fuzzle.org>2021-04-28 23:54:31 +0100
commit20ac0b41484ebcaef3f8bdc9d4410903fd499386 (patch)
tree2bb5c52a372de305061dd544303052bda8a75980 /src/vehicle_gui.cpp
parentde81afdf4bfb97a48533489101e3aa0e5eb2cb4f (diff)
downloadopenttd-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.cpp3
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)) {