Kaydet (Commit) 673fe197 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1371191 Missing move assignment operator

Change-Id: If543e0685f808cfe72eaa0ff60c87bb3b1a5ea42
üst e214fab7
......@@ -79,6 +79,12 @@ namespace canvas
mpWrappee = nullptr;
}
VCLObject( VCLObject&& rOrig )
: mpWrappee(rOrig.mpWrappee)
{
rOrig.mpWrappee = nullptr;
}
// This object has value semantics, thus, forward copy
// to wrappee
VCLObject( const Wrappee& rOrig ) :
......@@ -104,14 +110,20 @@ namespace canvas
return *this;
}
VCLObject& operator=( VCLObject&& rhs )
{
std::swap(mpWrappee, rhs.mpWrappee);
return *this;
}
~VCLObject()
{
// This here is the whole purpose of the template:
// protecting object deletion with the solar mutex
SolarMutexGuard aGuard;
if( mpWrappee )
delete mpWrappee;
delete mpWrappee;
}
Wrappee* operator->() { return mpWrappee; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment