redundant code warning line 400 src/apply.c

if (odummy->otyp == SLIME_MOLD
400 ->                    && has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM)

The definition of has_mcorpsenm macro is:
include/mextra.h:#define has_mcorpsenm(mon) ((mon)->mextra && MCORPSENM(mon) != NON_PM)

Remove the redundant code.
This commit is contained in:
nhmall
2022-08-17 21:16:23 -04:00
parent 694a7418df
commit ef6fde88ea

View File

@@ -396,8 +396,7 @@ use_stethoscope(struct obj *obj)
/* simple_typename() yields "fruit" for any named fruit;
we want the same thing '//' or ';' shows: "slime mold"
or "grape" or "slice of pizza" */
if (odummy->otyp == SLIME_MOLD
&& has_mcorpsenm(mtmp) && MCORPSENM(mtmp) != NON_PM) {
if (odummy->otyp == SLIME_MOLD && has_mcorpsenm(mtmp)) {
odummy->spe = MCORPSENM(mtmp);
what = simpleonames(odummy);
} else {