summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-02-24 23:36:40 +0000
committerpeter1138 <peter1138@openttd.org>2007-02-24 23:36:40 +0000
commit4c4b035175a6b8c23793bc3250c75bf50c4d72bd (patch)
tree368b3cf550c0fcbbf2c814f0896d36aa12a8e28d /src/vehicle_gui.cpp
parent29c81427842d282127c0e12789a156a1f833dcae (diff)
downloadopenttd-4c4b035175a6b8c23793bc3250c75bf50c4d72bd.tar.xz
(svn r8891) -Codechange: Remove remains of global cargo scheme. All cargo mapping is now dealt with only in NewGRF code, on load where possible.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 984d62b7d..1c3d1c55e 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -210,10 +210,8 @@ static RefitList *BuildRefitList(const Vehicle *v)
/* Loop through all cargos in the refit mask */
for (CargoID cid = 0; cid != NUM_CARGO && num_lines < max_lines; cid++) {
- const CargoSpec *cs = GetCargo(cid);
-
/* Skip cargo type if it's not listed */
- if (!HASBIT(cmask, cs->bitnum)) continue;
+ if (!HASBIT(cmask, cid)) continue;
/* Check the vehicle's callback mask for cargo suffixes */
if (HASBIT(callbackmask, CBM_CARGO_SUFFIX)) {
@@ -516,9 +514,7 @@ uint ShowRefitOptionsList(int x, int y, uint w, EngineID engine)
/* Add each cargo type to the list */
for (CargoID cid = 0; cid < NUM_CARGO; cid++) {
- const CargoSpec *cs = GetCargo(cid);
-
- if (!HASBIT(cmask, cs->bitnum)) continue;
+ if (!HASBIT(cmask, cid)) continue;
if (!first) b = strecpy(b, ", ", lastof(_userstring));
first = false;