diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-08-28 15:36:23 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2017-08-28 15:36:23 +0200 |
commit | 96ce8414175e600285f2d965844bb141c5a9cf5c (patch) | |
tree | ee815a1f4a84e69d8858e1957f063da63b76b41c | |
parent | cCuboid: restore default copy construct and assign. (diff) | |
download | cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar.gz cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar.bz2 cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar.lz cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar.xz cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.tar.zst cuberite-96ce8414175e600285f2d965844bb141c5a9cf5c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Cuboid.h | 2 | ||||
-rw-r--r-- | src/Globals.h | 4 | ||||
-rw-r--r-- | src/Item.h | 14 | ||||
-rw-r--r-- | src/Vector3.h | 2 |
4 files changed, 8 insertions, 14 deletions
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 diff --git a/src/Globals.h b/src/Globals.h index 67f3cd284..0c48d2ad9 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -476,6 +476,10 @@ using cTickTimeLong = std::chrono::duration<Int64, cTickTime::period>; #define TOLUA_TEMPLATE_BIND(x) #endif +#ifdef TOLUA_EXPOSITION + #error TOLUA_EXPOSITION should never actually be defined +#endif + diff --git a/src/Item.h b/src/Item.h index 493061d93..35c4e4582 100644 --- a/src/Item.h +++ b/src/Item.h @@ -80,20 +80,10 @@ public: // The constructor is disabled in code, because the compiler generates it anyway, // but it needs to stay because ToLua needs to generate the binding for it - #if 0 + #ifdef TOLUA_EXPOSITION /** Creates an exact copy of the item */ - cItem(const cItem & a_CopyFrom) : - m_ItemType (a_CopyFrom.m_ItemType), - m_ItemCount (a_CopyFrom.m_ItemCount), - m_ItemDamage (a_CopyFrom.m_ItemDamage), - m_Enchantments(a_CopyFrom.m_Enchantments), - m_CustomName (a_CopyFrom.m_CustomName), - m_Lore (a_CopyFrom.m_Lore), - m_RepairCost (a_CopyFrom.m_RepairCost), - m_FireworkItem(a_CopyFrom.m_FireworkItem) - { - } + cItem(const cItem & a_CopyFrom); #endif diff --git a/src/Vector3.h b/src/Vector3.h index 5c4839ab7..7c37c2601 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -21,7 +21,7 @@ public: inline Vector3(T a_x, T a_y, T a_z) : x(a_x), y(a_y), z(a_z) {} - #if 0 // Hardcoded copy constructors (tolua++ does not support function templates .. yet) + #ifdef TOLUA_EXPOSITION // Hardcoded copy constructors (tolua++ does not support function templates .. yet) Vector3(const Vector3<float> & a_Rhs); Vector3(const Vector3<double> & a_Rhs); Vector3(const Vector3<int> & a_Rhs); |