--- rxvt-unicode/src/rxvtutil.h 2014/11/10 12:14:48 1.61 +++ rxvt-unicode/src/rxvtutil.h 2021/05/13 19:40:20 1.65 @@ -1,23 +1,16 @@ #ifndef RXVT_UTIL_H #define RXVT_UTIL_H -#include #include #include + +#define ECB_NO_THREADS 1 #include "ecb.h" + #include "estl.h" #include "emman.h" -// increases code size unless -fno-enforce-eh-specs -#if __GNUC__ -# define NOTHROW -# define THROW(x) -#else -# define NOTHROW throw() -# define THROW(x) throw x -#endif - // various utility functions template static inline void min_it (T &a, U b) { a = a < (T)b ? a : (T)b; } template static inline void max_it (T &a, U b) { a = a > (T)b ? a : (T)b; } @@ -25,8 +18,6 @@ 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 T squared_diff (T a, T b) { return (a - b) * (a - b); } - // linear interpolation template static inline T @@ -63,10 +54,6 @@ void operator delete (void *p, size_t s); }; -// alas new/delete cannot be specified as inline in C++11 (see 17.6.4.6) -void *operator new (size_t s) throw (std::bad_alloc); -void operator delete (void *p) throw (); - struct stringvec : simplevec { ~stringvec ()