X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fpartcache.cpp;fp=source%2Fpartcache.cpp;h=77b51d2cbc2096a101eb941b20e45f6b23568c6a;hp=f4c085e5baa47c4230786eba92a2feb50ac8cf50;hb=6d9570c97584758e3cfcac6827d439b7fb844cf4;hpb=ab45b7660aec83978871ade009846dcb8c34579f diff --git a/source/partcache.cpp b/source/partcache.cpp index f4c085e..77b51d2 100644 --- a/source/partcache.cpp +++ b/source/partcache.cpp @@ -6,6 +6,24 @@ using namespace std; namespace Msp { namespace GLtk { +CachedPart::CachedPart(CachedPart &&other): + part(other.part), + texture(other.texture), + mesh(other.mesh) +{ + other.mesh = nullptr; +} + +CachedPart &CachedPart::operator=(CachedPart &&other) +{ + delete mesh; + part = other.part; + texture = other.texture; + mesh = other.mesh; + other.mesh = nullptr; + return *this; +} + CachedPart::~CachedPart() { delete mesh;