A little cleanup. Moved class to SmartPtr.cpp and SmartPtr.h files.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@1110 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2011-09-20 22:34:24 +00:00
parent 80a07d19e8
commit 16094ffe39
16 changed files with 450 additions and 344 deletions

View file

@ -15,9 +15,6 @@
#include <loki/StrongPtr.h>
#include <stdexcept>
#include <string>
#include <memory.h>
#ifdef DO_EXTRA_LOKI_TESTS
#include <cassert>
@ -41,45 +38,6 @@ namespace Private
// ----------------------------------------------------------------------------
void DeleteArrayBase::Swap( DeleteArrayBase & rhs )
{
assert( NULL != this );
const size_t temp = m_itemCount;
m_itemCount = rhs.m_itemCount;
rhs.m_itemCount = temp;
}
// ----------------------------------------------------------------------------
void DeleteArrayBase::OnInit( const void * p ) const
{
assert( NULL != this );
if ( NULL == p )
{
assert( 0 == m_itemCount );
}
else
{
assert( 0 < m_itemCount );
}
}
// ----------------------------------------------------------------------------
void DeleteArrayBase::OnCheckRange( size_t index ) const
{
assert( NULL != this );
if ( index < m_itemCount )
return;
const ::std::string message( "index out of range in ::Loki::DeleteArrayBase::OnCheckRange" );
throw ::std::out_of_range( message );
}
// ----------------------------------------------------------------------------
OneOwnerRefCountInfo::OneOwnerRefCountInfo( SingleOwnerRefCount * ptr )
: m_pointer( NULL )
, m_strongPtr( ptr )