cpp cleanliness: check for assignment to self
This commit is contained in:
parent
c37747173d
commit
8a4974c5cd
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue