1
0
Fork 0

Add TOLUA_EXPOSITION for readability

This commit is contained in:
peterbell10 2017-08-28 14:36:23 +01:00
parent f89becc761
commit 96ce841417
4 changed files with 8 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);