Skip to content
Snippets Groups Projects
Commit d607530a authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'coverity.FourMom-20180322' into 'master'

FourMom: Coverity 113518.

See merge request atlas/athena!9910

Former-commit-id: 5cd378d4
parents 0a0bbee3 a35a5e99
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,12 @@ public:
if (other.m_theData) m_theData = new T( *other); else m_theData = 0;
}
DeepCopyPointer (DeepCopyPointer&& other)
{
m_theData = other.m_theData;
other.m_theData = nullptr;
}
~DeepCopyPointer() { delete m_theData;}
DeepCopyPointer& operator=( const DeepCopyPointer& other) {
......@@ -35,6 +41,15 @@ public:
return *this;
}
DeepCopyPointer& operator=( DeepCopyPointer&& other) {
if ( this != &other && m_theData != other.m_theData) {
delete m_theData;
m_theData = other.m_theData;
other.m_theData = nullptr;
}
return *this;
}
T* get() { return m_theData; }
const T* get() const { return m_theData; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment