1
0

cCuboid: restore default copy construct and assign.

This commit is contained in:
peterbell10 2017-08-28 12:49:33 +01:00
parent 3687ef397c
commit f89becc761
2 changed files with 4 additions and 29 deletions

View File

@ -10,14 +10,6 @@
////////////////////////////////////////////////////////////////////////////////
// cCuboid:
cCuboid & cCuboid::operator =(cCuboid a_Other)
{
std::swap(p1, a_Other.p1);
std::swap(p2, a_Other.p2);
return *this;
}
void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
{
p1.x = a_X1;
@ -32,20 +24,6 @@ void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
void cCuboid::Assign(const cCuboid & a_SrcCuboid)
{
p1.x = a_SrcCuboid.p1.x;
p1.y = a_SrcCuboid.p1.y;
p1.z = a_SrcCuboid.p1.z;
p2.x = a_SrcCuboid.p2.x;
p2.y = a_SrcCuboid.p2.y;
p2.z = a_SrcCuboid.p2.z;
}
void cCuboid::Sort(void)
{
if (p1.x > p2.x)

View File

@ -13,15 +13,12 @@ public:
Vector3i p1, p2;
cCuboid(void) {}
cCuboid(const cCuboid & a_Cuboid) : p1(a_Cuboid.p1), p2(a_Cuboid.p2) {}
cCuboid(const Vector3i & a_p1, const Vector3i & a_p2) : p1(a_p1), p2(a_p2) {}
cCuboid(int a_X1, int a_Y1, int a_Z1) : p1(a_X1, a_Y1, a_Z1), p2(a_X1, a_Y1, a_Z1) {}
// tolua_end
cCuboid & operator =(cCuboid a_Other);
// tolua_begin
#if 0 // tolua isn't aware of implicitly generated copy constructors
cCuboid(const cCuboid & a_Cuboid);
#endif
// DEPRECATED, use cCuboid(Vector3i, Vector3i) instead
cCuboid(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2) : p1(a_X1, a_Y1, a_Z1), p2(a_X2, a_Y2, a_Z2)
@ -30,7 +27,7 @@ public:
}
void Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2);
void Assign(const cCuboid & a_SrcCuboid);
void Assign(const cCuboid & a_SrcCuboid) { *this = a_SrcCuboid; }
void Sort(void);