(nuk_maxno): Variable's value is well-known constant N_MAXNUKE + 1.
Useless, remove. Users changed to check nchr's sentinel, because that's clearer than comparing the index to N_MAXNUKE or sizeof(nchr) / sizeof(*nchr). (nchr): Change sentinel's n_name to NULL.
This commit is contained in:
parent
856539fc54
commit
8c6529ded3
3 changed files with 2 additions and 7 deletions
|
@ -80,6 +80,4 @@ struct nchrstr {
|
|||
|
||||
extern struct nchrstr nchr[N_MAXNUKE + 1];
|
||||
|
||||
extern int nuk_maxno;
|
||||
|
||||
#endif /* _NUKE_H_ */
|
||||
|
|
|
@ -50,8 +50,5 @@ struct nchrstr nchr[] = {
|
|||
{"3mt fusion", 100, 100, 75, 130, 7, 170, 45000, 360, 6, 0},
|
||||
{"5mt fusion", 120, 120, 100, 150, 8, 190, 50000, 370, 8, 0},
|
||||
{"120kt neutron", 75, 75, 40, 120, 5, 50, 36000, 375, 3, N_NEUT},
|
||||
{"", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{"", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
{NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
};
|
||||
|
||||
int nuk_maxno = (sizeof(nchr) / sizeof(struct nchrstr)) - 1;
|
||||
|
|
|
@ -519,7 +519,7 @@ nullify_objects(void)
|
|||
if (opt_NO_OIL)
|
||||
mchr[i].m_flags &= ~M_OIL;
|
||||
}
|
||||
for (i = 0; i < nuk_maxno; i++) {
|
||||
for (i = 0; nchr[i].n_name; i++) {
|
||||
if (opt_NO_HCMS)
|
||||
nchr[i].n_hcm = 0;
|
||||
if (opt_NO_LCMS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue