fix move-ctor and move-assignement operator of graphics(#253)
This commit is contained in:
parent
b0a58ed62f
commit
803acb13f0
@ -240,12 +240,16 @@ namespace paint
|
||||
graphics::graphics(graphics&& other)
|
||||
: impl_(std::move(other.impl_))
|
||||
{
|
||||
other.impl_.reset(new implementation);
|
||||
}
|
||||
|
||||
graphics& graphics::operator=(graphics&& other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
impl_ = std::move(other.impl_);
|
||||
other.impl_.reset(new implementation);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user