Changeset - r3943:a0d88767ed03
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-06-03 19:23:14
peter1138@openttd.org
(svn r5088) - Add another set of parentheses, missed in r5085, somehow... (thanks ASM)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
macros.h
Show inline comments
 
@@ -123,13 +123,13 @@ static inline int KillFirstBit2x64(int v
 
/* [min,max), strictly less than */
 
#define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min)))
 
#define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min)))
 

	
 

	
 
#define CHANCE16(a,b) ((uint16)Random() <= (uint16)((65536 * (a)) / (b)))
 
#define CHANCE16R(a,b,r) ((uint16)(r=Random()) <= (uint16)((65536 * a) / (b)))
 
#define CHANCE16R(a,b,r) ((uint16)(r=Random()) <= (uint16)((65536 * (a)) / (b)))
 
#define CHANCE16I(a,b,v) ((uint16)(v) <= (uint16)((65536 * (a)) / (b)))
 

	
 

	
 
#define for_each_bit(_i, _b)            \
 
	for (_i = 0; _b != 0; _i++, _b >>= 1) \
 
		if (_b & 1)
0 comments (0 inline, 0 general)