From f89becc7610af1ccf396831dd829fe6e04159e5b Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 28 Aug 2017 12:49:33 +0100 Subject: cCuboid: restore default copy construct and assign. --- src/Cuboid.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Cuboid.h') diff --git a/src/Cuboid.h b/src/Cuboid.h index b9d5f8cfa..73edd31d9 100644 --- a/src/Cuboid.h +++ b/src/Cuboid.h @@ -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); -- cgit v1.2.3 From 96ce8414175e600285f2d965844bb141c5a9cf5c Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 28 Aug 2017 14:36:23 +0100 Subject: Add TOLUA_EXPOSITION for readability --- src/Cuboid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Cuboid.h') diff --git a/src/Cuboid.h b/src/Cuboid.h index 73edd31d9..acb19d46b 100644 --- a/src/Cuboid.h +++ b/src/Cuboid.h @@ -16,7 +16,7 @@ public: 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) {} - #if 0 // tolua isn't aware of implicitly generated copy constructors + #ifdef TOLUA_EXPOSITION // tolua isn't aware of implicitly generated copy constructors cCuboid(const cCuboid & a_Cuboid); #endif -- cgit v1.2.3