--- rxvt-unicode/src/rxvtutil.h 2012/05/25 07:48:03 1.55 +++ rxvt-unicode/src/rxvtutil.h 2014/10/23 22:39:40 1.59 @@ -7,6 +7,8 @@ #include "ecb.h" #include "estl.h" +#include "emman.h" + // increases code size unless -fno-enforce-eh-specs #if __GNUC__ # define NOTHROW @@ -88,14 +90,14 @@ #endif inline void * -operator new (size_t size) +operator new (size_t size) throw (std::bad_alloc) { // TODO: use rxvt_malloc return malloc (size); } inline void -operator delete (void *p) +operator delete (void *p) throw () { free (p); } @@ -110,7 +112,7 @@ explicit auto_ptr (T *a) : p (a) { } - auto_ptr (auto_ptr &a) + auto_ptr (auto_ptr &a) { p = a.p; a.p = 0; @@ -137,15 +139,13 @@ // void because it makes sense in our context void operator =(auto_ptr &a) { - *this = a.p; - a.p = 0; + reset (a.release ()); } template void operator =(auto_ptr &a) { - *this = a.p; - a.p = 0; + reset (a.release ()); } T *operator ->() const { return p; }