scoped_ptr::reset changed to copy+swap (problem reported by Thomas Witt)

[SVN r15239]
This commit is contained in:
Peter Dimov
2002-09-09 17:44:33 +00:00
parent f79b8cb7ae
commit 4ea6decc7d

View File

@ -61,10 +61,9 @@ public:
void reset(T * p = 0) // never throws
{
if (ptr != p)
if(ptr != p)
{
checked_delete(ptr);
ptr = p;
this_type(p).swap(*this);
}
}