forked from mirror/OpenTTD
(svn r3958) Change HASBIT() to return 0/1 instead of 0/value of tested bit. Backport of r3747 from trunk
This commit is contained in:
2
macros.h
2
macros.h
@@ -57,7 +57,7 @@ static inline int64 BIGMULS(int32 a, int32 b) {
|
||||
#define IS_INSIDE_1D(x, base, size) ( (uint)((x) - (base)) < ((uint)(size)) )
|
||||
|
||||
|
||||
#define HASBIT(x,y) ((x) & (1 << (y)))
|
||||
#define HASBIT(x,y) (((x) & (1 << (y))) != 0)
|
||||
#define SETBIT(x,y) ((x) |= (1 << (y)))
|
||||
#define CLRBIT(x,y) ((x) &= ~(1 << (y)))
|
||||
#define TOGGLEBIT(x,y) ((x) ^= (1 << (y)))
|
||||
|
Reference in New Issue
Block a user