--- rxvt-unicode/src/rxvtutil.h 2005/12/21 10:34:24 1.12 +++ rxvt-unicode/src/rxvtutil.h 2005/12/21 14:23:30 1.14 @@ -14,14 +14,15 @@ static bool vax () { return e == 0x44332211; }; } byteorder; -template -static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } -template -static inline T max (T a, U b) { return a > (T)b ? a : (T)b; } -template -static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; } -template -static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; } +template static inline T min (T a, U b) { return a < (T)b ? a : (T)b; } +template static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; } +template static inline T max (T a, U b) { return a > (T)b ? a : (T)b; } +template static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; } + +template static inline T clamp (T v, U a, V b) { return v < (T)a ? a : v >(T)b ? b : v; } +template static inline void clamp_it (T &v, U a, V b) { v = v < (T)a ? a : v >(T)b ? b : v; } + +template static inline void swap (T& a, U& b) { T t=a; a=(T)b; b=(U)t; } // in range including end #define IN_RANGE_INC(val,beg,end) \