Minor tweaks.

[SVN r12684]
This commit is contained in:
Peter Dimov
2002-02-04 11:15:40 +00:00
parent 6ed07733cb
commit c29cc62d66
8 changed files with 14 additions and 10 deletions
+3 -1
View File
@@ -12,7 +12,7 @@
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
// See http://www.boost.org for most recent version including documentation.
// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
//
#include <boost/config.hpp> // for broken compiler workarounds
@@ -109,7 +109,9 @@ public:
shared_ptr(shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
{
if (px == 0) // need to allocate new counter -- the cast failed
{
pn = detail::shared_count(static_cast<element_type *>(0), deleter());
}
}
#ifndef BOOST_NO_AUTO_PTR