|
From: <ric...@us...> - 2011-09-13 00:50:11
|
Revision: 1100
http://loki-lib.svn.sourceforge.net/loki-lib/?rev=1100&view=rev
Author: rich_sposato
Date: 2011-09-13 00:50:05 +0000 (Tue, 13 Sep 2011)
Log Message:
-----------
Added call to OnDereference to constructor.
Modified Paths:
--------------
trunk/include/loki/SmartPtr.h
Modified: trunk/include/loki/SmartPtr.h
===================================================================
--- trunk/include/loki/SmartPtr.h 2011-09-09 00:30:44 UTC (rev 1099)
+++ trunk/include/loki/SmartPtr.h 2011-09-13 00:50:05 UTC (rev 1100)
@@ -1252,7 +1252,7 @@
template <class> class SP1,
template <class> class CNP1
>
- SmartPtr(const SmartPtr<T1, OP1, CP1, KP1, SP1, CNP1 >& rhs)
+ SmartPtr( const SmartPtr< T1, OP1, CP1, KP1, SP1, CNP1 >& rhs )
: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
{
KP::OnDereference( GetImpl( rhs ) );
@@ -1268,7 +1268,7 @@
template <class> class SP1,
template <class> class CNP1
>
- SmartPtr(SmartPtr<T1, OP1, CP1, KP1, SP1, CNP1 >& rhs)
+ SmartPtr( SmartPtr< T1, OP1, CP1, KP1, SP1, CNP1 >& rhs )
: SP(rhs), OP(rhs), KP(rhs), CP(rhs)
{
KP::OnDereference( GetImpl( rhs ) );
@@ -1277,7 +1277,11 @@
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); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|