From: Michael Meyer Date: Tue, 4 Oct 2022 21:26:23 +0000 (-0400) Subject: Don't use boolean for losehp killer format type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0dfa40cd32284701df6d93c8b78ff129e86e219;p=nethack Don't use boolean for losehp killer format type Killer format isn't a boolean, since it has 3 possible values (KILLED_BY_AN, KILLED_BY, NO_KILLER_PREFIX). It shouldn't make any difference behind the scenes, but it's confusing to use 'boolean' for it. --- diff --git a/include/extern.h b/include/extern.h index 68adedd8e..e1f1b9f6d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -977,7 +977,7 @@ extern int monster_nearby(void); extern void end_running(boolean); extern void nomul(int); extern void unmul(const char *); -extern void losehp(int, const char *, boolean); +extern void losehp(int, const char *, schar); extern int weight_cap(void); extern int inv_weight(void); extern int near_capacity(void); diff --git a/src/hack.c b/src/hack.c index dabe05e7f..aff4a2a99 100644 --- a/src/hack.c +++ b/src/hack.c @@ -3645,7 +3645,7 @@ maybe_wail(void) } void -losehp(int n, const char *knam, boolean k_format) +losehp(int n, const char *knam, schar k_format) { #if 0 /* code below is prepared to handle negative 'loss' so don't add this * until we've verified that no callers intentionally rely on that */