cpp cleanliness: check for assignment to self

This commit is contained in:
An Leenders 2011-01-25 17:37:59 +01:00 committed by Caolán McNamara
parent c37747173d
commit 8a4974c5cd

View file

@ -357,9 +357,11 @@ namespace abp
//---------------------------------------------------------------------
ODataSource& ODataSource::operator=( const ODataSource& _rSource )
{
delete m_pImpl;
m_pImpl = new ODataSourceImpl( *_rSource.m_pImpl );
if( this != &_rSource )
{
delete m_pImpl;
m_pImpl = new ODataSourceImpl( *_rSource.m_pImpl );
}
return *this;
}