replace x >= LOW_PM with ismnum(x) shorthand macro

This commit is contained in:
nhmall
2024-01-11 14:01:10 -05:00
parent 58031920dc
commit 25a8c258e6
31 changed files with 119 additions and 107 deletions

View File

@@ -2419,12 +2419,12 @@ obj_pmname(struct obj *obj)
struct monst *m = OMONST(obj);
/* obj->oextra->omonst->data is Null but ...->mnum is set */
if (m->mnum >= LOW_PM)
if (ismnum(m->mnum))
return pmname(&mons[m->mnum], m->female ? FEMALE : MALE);
}
#endif
if ((obj->otyp == CORPSE || obj->otyp == STATUE || obj->otyp == FIGURINE)
&& obj->corpsenm >= LOW_PM) {
&& ismnum(obj->corpsenm)) {
int cgend = (obj->spe & CORPSTAT_GENDER),
mgend = ((cgend == CORPSTAT_MALE) ? MALE
: (cgend == CORPSTAT_FEMALE) ? FEMALE