fix rtt copy/move
This commit is contained in:
30
src/rtt.cpp
30
src/rtt.cpp
@@ -4,8 +4,31 @@
|
||||
#include "util.h"
|
||||
#include "app.h"
|
||||
|
||||
RTT& RTT::operator=(RTT&& other)
|
||||
{
|
||||
LOG("RTT-move-assignment");
|
||||
int_fmt = other.int_fmt;
|
||||
texID = other.texID;
|
||||
fboID = other.fboID;
|
||||
rboID = other.rboID;
|
||||
w = other.w;
|
||||
h = other.h;
|
||||
bound = other.bound;
|
||||
|
||||
other.int_fmt = 0;
|
||||
other.texID = 0;
|
||||
other.fboID = 0;
|
||||
other.rboID = 0;
|
||||
other.w = 0;
|
||||
other.h = 0;
|
||||
other.bound = false;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
RTT::RTT()
|
||||
{
|
||||
int_fmt = 0;
|
||||
fboID = 0;
|
||||
rboID = 0;
|
||||
w = 0;
|
||||
@@ -15,12 +38,18 @@ RTT::RTT()
|
||||
|
||||
RTT::RTT(RTT&& other)
|
||||
{
|
||||
LOG("RTT-move-ctor");
|
||||
|
||||
int_fmt = other.int_fmt;
|
||||
texID = other.texID;
|
||||
fboID = other.fboID;
|
||||
rboID = other.rboID;
|
||||
w = other.w;
|
||||
h = other.h;
|
||||
bound = other.bound;
|
||||
|
||||
other.int_fmt = 0;
|
||||
other.texID = 0;
|
||||
other.fboID = 0;
|
||||
other.rboID = 0;
|
||||
other.w = 0;
|
||||
@@ -30,6 +59,7 @@ RTT::RTT(RTT&& other)
|
||||
|
||||
RTT::~RTT()
|
||||
{
|
||||
LOG("RTT-dtor");
|
||||
//destroy();
|
||||
if (texID || rboID || fboID)
|
||||
LOG("RTT not destroyed");
|
||||
|
||||
Reference in New Issue
Block a user