# HG changeset patch # User tron # Date 1172169882 0 # Node ID 0656e15abc248f0036b681d483c210e7844ba643 # Parent ba7221d509b8ba8992f6780fc8f7102a77a22804 (svn r8846) -Fix Remove confusing superfluous parentheses diff -r ba7221d509b8 -r 0656e15abc24 src/macros.h --- a/src/macros.h Thu Feb 22 18:34:57 2007 +0000 +++ b/src/macros.h Thu Feb 22 18:44:42 2007 +0000 @@ -43,44 +43,43 @@ return a; } -static inline int32 BIGMULSS(int32 a, int32 b, int shift) { - return (int32)(((int64)(a) * (int64)(b)) >> (shift)); +static inline int32 BIGMULSS(int32 a, int32 b, int shift) +{ + return (int32)((int64)a * (int64)b >> shift); } -static inline uint32 BIGMULUS(uint32 a, uint32 b, int shift) { - return (uint32)(((uint64)(a) * (uint64)(b)) >> (shift)); +static inline uint32 BIGMULUS(uint32 a, uint32 b, int shift) +{ + return (uint32)((uint64)a * (uint64)b >> shift); } -static inline int64 BIGMULS(int32 a, int32 b) { - return (int64)(a) * (int64)(b); +static inline int64 BIGMULS(int32 a, int32 b) +{ + return (int64)a * (int64)b; } /* OPT: optimized into an unsigned comparison */ //#define IS_INSIDE_1D(x, base, size) ((x) >= (base) && (x) < (base) + (size)) #define IS_INSIDE_1D(x, base, size) ( (uint)((x) - (base)) < ((uint)(size)) ) -template -static inline bool HASBIT(T x, int y) +template static inline bool HASBIT(T x, int y) { - return (x & (((T)1) << y)) != 0; + return (x & ((T)1 << y)) != 0; } -template -static inline T SETBIT(T& x, int y) +template static inline T SETBIT(T& x, int y) { - return x |= (((T)1) << y); + return x |= (T)1 << y; } -template -static inline T CLRBIT(T& x, int y) +template static inline T CLRBIT(T& x, int y) { - return x &= ~(((T)1) << y); + return x &= ~((T)1 << y); } -template -static inline T TOGGLEBIT(T& x, int y) +template static inline T TOGGLEBIT(T& x, int y) { - return x ^= (((T)1) << y); + return x ^= (T)1 << y; }