(show_sect_capab, mission_pln_equip, pln_equip): Change i_type

references to use I_NONE instead of zero.  Zero has been invalid since
item.h rev. 1.12, and was questionable style before.
This commit is contained in:
Ron Koenderink 2005-07-07 21:57:15 +00:00
parent c6262a209c
commit c0d009758c
3 changed files with 5 additions and 5 deletions

View file

@ -1279,7 +1279,7 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags,
item[I_PETROL] -= pcp->pl_fuel; item[I_PETROL] -= pcp->pl_fuel;
rval = 0; rval = 0;
if (!(flags & P_F)) { if (!(flags & P_F)) {
itype = 0; itype = I_NONE;
needed = 0; needed = 0;
switch (mission) { switch (mission) {
case 's': case 's':
@ -1320,7 +1320,7 @@ mission_pln_equip(struct plist *plp, struct ichrstr *ip, int flags,
default: default:
break; break;
} }
if (rval < 0 || (itype && needed <= 0)) { if (rval < 0 || (itype != I_NONE && needed <= 0)) {
return -1; return -1;
} }
if (item[itype] < needed && (itype == I_SHELL)) if (item[itype] < needed && (itype == I_SHELL))

View file

@ -599,7 +599,7 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission)
item[I_PETROL] -= pcp->pl_fuel; item[I_PETROL] -= pcp->pl_fuel;
rval = 0; rval = 0;
if ((flags & P_F) == 0) { if ((flags & P_F) == 0) {
itype = 0; itype = I_NONE;
needed = 0; needed = 0;
switch (mission) { switch (mission) {
case 's': case 's':
@ -641,7 +641,7 @@ pln_equip(struct plist *plp, struct ichrstr *ip, int flags, s_char mission)
default: default:
break; break;
} }
if (rval < 0 || (itype && needed <= 0)) { if (rval < 0 || (itype != I_NONE && needed <= 0)) {
pr("%s can't contribute to mission\n", prplane(pp)); pr("%s can't contribute to mission\n", prplane(pp));
return -1; return -1;
} }

View file

@ -732,7 +732,7 @@ show_sect_capab(int foo)
pchr[j].p_nlmin, pchr[j].p_nlmin,
pchr[j].p_nllag, pchr[j].p_nllag,
pchr[j].p_effic, pchr[j].p_cost, pchr[j].p_nrdep, pchr[j].p_effic, pchr[j].p_cost, pchr[j].p_nrdep,
pchr[j].p_type ? ichr[pchr[j].p_type].i_mnem : ' '); pchr[j].p_type != I_NONE ? ichr[pchr[j].p_type].i_mnem : ' ');
pr("\n"); pr("\n");
} }