]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.cpp
Add correct copy and move semantics to most classes
[libs/gl.git] / source / render / programdata.cpp
index 40eba5e5d6840a4580c1d311c67da732231253ab..cfd2c0f5257b0d45d341ff15119805ea96038474 100644 (file)
@@ -60,6 +60,22 @@ ProgramData &ProgramData::operator=(const ProgramData &other)
        return *this;
 }
 
+ProgramData::ProgramData(ProgramData &&other):
+       tied_program(other.tied_program),
+       uniforms(move(other.uniforms)),
+       uniform_data(move(other.uniform_data)),
+       generation(other.generation),
+       blocks(move(other.blocks)),
+       programs(move(other.programs)),
+       last_buffer_block(other.last_buffer_block),
+       buffer(other.buffer),
+       dirty(other.dirty),
+       debug_name(move(other.debug_name))
+{
+       other.blocks.clear();
+       other.buffer = 0;
+}
+
 ProgramData::~ProgramData()
 {
        for(SharedBlock &b: blocks)