Added call to OnDereference to constructor.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1100 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-13 00:50:05 +00:00
parent 3808e423f2
commit 3af86d72a1

View file

@ -1277,7 +1277,11 @@ namespace Loki
SmartPtr(RefToValue<SmartPtr> rhs)
: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
{}
{
SmartPtr & ref = rhs;
KP::OnDereference( GetImpl( ref ) );
GetImplRef( *this ) = OP::Clone( GetImplRef( ref ) );
}
operator RefToValue<SmartPtr>()
{ return RefToValue<SmartPtr>(*this); }