--- rxvt-unicode/src/rxvtutil.h 2012/05/25 07:48:03 1.55 +++ rxvt-unicode/src/rxvtutil.h 2012/06/28 15:19:15 1.58 @@ -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 @@ -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; }