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
+1 -2
View File
@@ -395,8 +395,7 @@ veggy_item(struct obj* obj, int otyp /* used iff obj is null */)
if (otyp == TIN && corpsenm == NON_PM) /* implies obj is non-null */
return (boolean) (obj->spe == 1); /* 0 = empty, 1 = spinach */
if (otyp == TIN || otyp == CORPSE)
return (boolean) (corpsenm >= LOW_PM
&& vegetarian(&mons[corpsenm]));
return (boolean) (ismnum(corpsenm) && vegetarian(&mons[corpsenm]));
}
return FALSE;
}