diff --git a/src/battle.c b/src/battle.c index 2facbb30f..34d4618a5 100644 --- a/src/battle.c +++ b/src/battle.c @@ -3130,7 +3130,7 @@ static void print_stats(battle * b) static int weapon_weight(const weapon * w, bool missile) { - if (missile == i2b(fval(w->type, WTF_MISSILE))) { + if (missile == !!(fval(w->type, WTF_MISSILE))) { return w->attackskill + w->defenseskill; } return 0; diff --git a/src/creport.c b/src/creport.c index b74c5cdef..b63a30ad4 100644 --- a/src/creport.c +++ b/src/creport.c @@ -782,7 +782,7 @@ void cr_output_unit(stream *out, const region * r, const faction * f, if (sf != u->faction) stream_printf(out, "%d;Verkleidung\n", sf->no); if (fval(u, UFL_ANON_FACTION)) - stream_printf(out, "%d;Parteitarnung\n", i2b(fval(u, UFL_ANON_FACTION))); + stream_printf(out, "%d;Parteitarnung\n", (u->flags & UFL_ANON_FACTION)!=0); if (otherfaction && otherfaction != u->faction) { stream_printf(out, "%d;Anderepartei\n", otherfaction->no); } @@ -794,7 +794,7 @@ void cr_output_unit(stream *out, const region * r, const faction * f, else { if (fval(u, UFL_ANON_FACTION)) { /* faction info is hidden */ - stream_printf(out, "%d;Parteitarnung\n", i2b(fval(u, UFL_ANON_FACTION))); + stream_printf(out, "%d;Parteitarnung\n", (u->flags & UFL_ANON_FACTION) != 0); } else { const attrib *a_otherfaction = a_find(u->attribs, &at_otherfaction); diff --git a/src/kernel/config.h b/src/kernel/config.h index b9bb3f4d3..fd929e8f7 100644 --- a/src/kernel/config.h +++ b/src/kernel/config.h @@ -34,8 +34,6 @@ struct param; #define OBJECTIDSIZE (NAMESIZE+5+IDSIZE) /* max. L�nge der Strings, die * von struct unitname, etc. zur�ckgegeben werden. ohne die 0 */ -#define i2b(i) ((bool)((i)?(true):(false))) - #define fval(u, i) ((u)->flags & (i)) #define fset(u, i) ((u)->flags |= (i)) #define freset(u, i) ((u)->flags &= ~(i)) diff --git a/src/magic.c b/src/magic.c index 803f20c78..d13be7c07 100644 --- a/src/magic.c +++ b/src/magic.c @@ -347,7 +347,7 @@ attrib_type at_mage = { bool is_mage(const unit * u) { - return i2b(get_mage(u) != NULL); + return get_mage(u) != NULL; } sc_mage *get_mage(const unit * u) @@ -2167,7 +2167,7 @@ typedef struct familiar_data { bool is_familiar(const unit * u) { attrib *a = a_find(u->attribs, &at_familiarmage); - return i2b(a != NULL); + return a != NULL; } static void