]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/partcache.cpp
Make sure classes follow the rule of 0/3/5
[libs/gltk.git] / source / partcache.cpp
index f4c085e5baa47c4230786eba92a2feb50ac8cf50..77b51d2cbc2096a101eb941b20e45f6b23568c6a 100644 (file)
@@ -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;