summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-28 14:36:08 (GMT)
committerBrad King <brad.king@kitware.com>2007-02-28 14:36:08 (GMT)
commitb1aae98926b9a6021d6404ce5a5f52eb2d15643d (patch)
tree9e22f12a8f0168755d111ae14c6f62e703710689 /Source
parent5ba5c450e62b7946e018b4ccea52ddc75e703f12 (diff)
downloadCMake-b1aae98926b9a6021d6404ce5a5f52eb2d15643d.zip
CMake-b1aae98926b9a6021d6404ce5a5f52eb2d15643d.tar.gz
CMake-b1aae98926b9a6021d6404ce5a5f52eb2d15643d.tar.bz2
BUG: Assignment should always use reset().
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/auto_ptr.hxx.in2
1 files changed, 1 insertions, 1 deletions
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<X> r) throw(): x_(r.p_.release()) {}
template <class Y> operator auto_ptr_ref<Y>() throw() { return auto_ptr_ref<Y>(*this); }
template <class Y> operator auto_ptr<Y>() throw() { return release(); }
- auto_ptr& operator=(auto_ptr_ref<X> r) throw() { x_ = r.p_.release(); return *this; }
+ auto_ptr& operator=(auto_ptr_ref<X> r) throw() { reset(r.p_.release()); return *this; }
};
} // namespace @KWSYS_NAMESPACE@