]> granicus.if.org Git - nethack/commitdiff
Don't use boolean for losehp killer format type
authorMichael Meyer <me@entrez.cc>
Tue, 4 Oct 2022 21:26:23 +0000 (17:26 -0400)
committerPatR <rankin@nethack.org>
Sat, 8 Oct 2022 23:29:55 +0000 (16:29 -0700)
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.

include/extern.h
src/hack.c

index 68adedd8eddeee0ac9f07b16e9ba9754020a9171..e1f1b9f6ded8f6157406a850dfa2933c0119fac8 100644 (file)
@@ -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);
index dabe05e7ff8be03e30e1279bbfee3de2888418a8..aff4a2a99e16d82bbfe077fac31e13178fe0ace2 100644 (file)
@@ -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 */