1
0
Fork 0

Repair the removed constructor of cCuboid `cCuboid(otherCuboid)` (#3966)

* Repair the removed constructor of cCuboid `cCuboid(const cCuboid & a_Cuboid) : p1(a_Cuboid.p1), p2(a_Cuboid.p2) {}`

* Update Cuboid.cpp

* Update Cuboid.h
This commit is contained in:
Bastien ADAM 2017-08-28 11:01:12 +02:00 committed by Alexander Harkness
parent 6bc5031517
commit a5869b3c09
2 changed files with 13 additions and 2 deletions

View File

@ -10,8 +10,12 @@
////////////////////////////////////////////////////////////////////////////////
// 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)

View File

@ -13,9 +13,16 @@ 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
// 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)
{