diff options
author | glx22 <glx@openttd.org> | 2021-06-13 04:29:24 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-07-09 21:36:09 +0200 |
commit | a543a4b7bb0d869800591ec1504b3934b68ecd8f (patch) | |
tree | b3c63e456cf0e544c2ec6301d85f34c7dea9d6d2 /src/economy.cpp | |
parent | 89ab8b79a51b4963da55dce195ea1ab520c73b50 (diff) | |
download | openttd-a543a4b7bb0d869800591ec1504b3934b68ecd8f.tar.xz |
Codechange: Remove FOR_EACH_SET_CARGO_ID
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 0c2e73cbd..c3332c4d1 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1480,9 +1480,8 @@ static void HandleStationRefit(Vehicle *v, CargoArray &consist_capleft, Station bool is_auto_refit = new_cid == CT_AUTO_REFIT; if (is_auto_refit) { /* Get a refittable cargo type with waiting cargo for next_station or INVALID_STATION. */ - CargoID cid; new_cid = v_start->cargo_type; - FOR_EACH_SET_CARGO_ID(cid, refit_mask) { + for (CargoID cid : SetCargoBitIterator(refit_mask)) { if (st->goods[cid].cargo.HasCargoFor(next_station)) { /* Try to find out if auto-refitting would succeed. In case the refit is allowed, * the returned refit capacity will be greater than zero. */ |