From b1aae98926b9a6021d6404ce5a5f52eb2d15643d Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 28 Feb 2007 09:36:08 -0500 Subject: BUG: Assignment should always use reset(). --- Source/kwsys/auto_ptr.hxx.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/kwsys/auto_ptr.hxx.in b/Source/kwsys/auto_ptr.hxx.in index f068c9f..6b0befc 100644 --- a/Source/kwsys/auto_ptr.hxx.in +++ b/Source/kwsys/auto_ptr.hxx.in @@ -55,7 +55,7 @@ public: auto_ptr(auto_ptr_ref r) throw(): x_(r.p_.release()) {} template operator auto_ptr_ref() throw() { return auto_ptr_ref(*this); } template operator auto_ptr() throw() { return release(); } - auto_ptr& operator=(auto_ptr_ref r) throw() { x_ = r.p_.release(); return *this; } + auto_ptr& operator=(auto_ptr_ref r) throw() { reset(r.p_.release()); return *this; } }; } // namespace @KWSYS_NAMESPACE@ -- cgit v0.12