MiniEngine/sdl_engine_surface.hpp

28 lines
434 B
C++
Raw Normal View History

2017-01-05 13:25:09 +08:00
Surface::Surface()
{
pimpl=new impl;
}
Surface::Surface(const Surface& inc) : Surface()
2017-01-05 13:25:09 +08:00
{
*pimpl=*(inc.pimpl);
2017-01-05 13:25:09 +08:00
}
Surface& Surface::operator = (const Surface& inc)
2017-01-05 13:25:09 +08:00
{
*pimpl=*(inc.pimpl);
return *this;
}
Surface::Surface(Surface&& inc)
{
pimpl=inc.pimpl;
inc.pimpl=nullptr;
}
Surface& Surface::operator = (Surface&& inc)
{
*(pimpl)=*(inc.pimpl);
return *this;
}
Surface::~Surface()
{
delete pimpl;
2017-01-05 13:25:09 +08:00
}