Used initialization instead of assignment within constructor.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1074 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
92aa90cc6f
commit
d617910699
1 changed files with 17 additions and 8 deletions
|
@ -22,6 +22,11 @@
|
|||
|
||||
#include <loki/SmallObj.h>
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable: 4355 )
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -134,8 +139,9 @@ void TwoRefCounts::ZapPointer( void )
|
|||
TwoRefLinks::TwoRefLinks( const void * p, bool strong )
|
||||
: m_pointer( const_cast< void * >( p ) )
|
||||
, m_strong( strong )
|
||||
, m_prev( this )
|
||||
, m_next( this )
|
||||
{
|
||||
m_prev = m_next = this;
|
||||
#ifdef DO_EXTRA_LOKI_TESTS
|
||||
assert( CountPrevCycle( this ) == CountNextCycle( this ) );
|
||||
#endif
|
||||
|
@ -573,5 +579,8 @@ bool TwoRefLinks::Merge( TwoRefLinks & rhs )
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
} // end namespace Loki
|
||||
#if defined( _MSC_VER )
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
} // end namespace Loki
|
||||
|
|
Loading…
Reference in a new issue