mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Remove the _cmp metamethod from the entity types because it's useless for registered types.
This commit is contained in:
parent
411ac5ef28
commit
27af2cfd3c
@ -38,23 +38,6 @@ CBlip::~CBlip()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CBlip::Cmp(const CBlip & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CBlip::ToString() const
|
||||
{
|
||||
@ -310,7 +293,6 @@ void Register_CBlip(HSQUIRRELVM vm)
|
||||
Class< CBlip, NoConstructor< CBlip > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CBlip::Cmp)
|
||||
.Func(_SC("_tostring"), &CBlip::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CBlip::Max)
|
||||
|
@ -80,11 +80,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CBlip & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -51,23 +51,6 @@ CCheckpoint::~CCheckpoint()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CCheckpoint::Cmp(const CCheckpoint & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CCheckpoint::ToString() const
|
||||
{
|
||||
@ -528,7 +511,6 @@ void Register_CCheckpoint(HSQUIRRELVM vm)
|
||||
Class< CCheckpoint, NoConstructor< CCheckpoint > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CCheckpoint::Cmp)
|
||||
.Func(_SC("_tostring"), &CCheckpoint::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CCheckpoint::Max)
|
||||
|
@ -101,11 +101,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CCheckpoint & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -38,23 +38,6 @@ CKeybind::~CKeybind()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CKeybind::Cmp(const CKeybind & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CKeybind::ToString() const
|
||||
{
|
||||
@ -209,7 +192,6 @@ void Register_CKeybind(HSQUIRRELVM vm)
|
||||
Class< CKeybind, NoConstructor< CKeybind > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CKeybind::Cmp)
|
||||
.Func(_SC("_tostring"), &CKeybind::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CKeybind::Max)
|
||||
|
@ -80,11 +80,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CKeybind & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -51,23 +51,6 @@ CObject::~CObject()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CObject::Cmp(const CObject & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CObject::ToString() const
|
||||
{
|
||||
@ -888,7 +871,6 @@ void Register_CObject(HSQUIRRELVM vm)
|
||||
Class< CObject, NoConstructor< CObject > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CObject::Cmp)
|
||||
.Func(_SC("_tostring"), &CObject::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CObject::Max)
|
||||
|
@ -117,11 +117,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CObject & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -43,23 +43,6 @@ CPickup::~CPickup()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CPickup::Cmp(const CPickup & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CPickup::ToString() const
|
||||
{
|
||||
@ -451,7 +434,6 @@ void Register_CPickup(HSQUIRRELVM vm)
|
||||
Class< CPickup, NoConstructor< CPickup > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CPickup::Cmp)
|
||||
.Func(_SC("_tostring"), &CPickup::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CPickup::Max)
|
||||
|
@ -99,11 +99,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CPickup & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -73,23 +73,6 @@ CPlayer::~CPlayer()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CPlayer::Cmp(const CPlayer & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CPlayer::ToString() const
|
||||
{
|
||||
@ -2365,7 +2348,6 @@ void Register_CPlayer(HSQUIRRELVM vm)
|
||||
Class< CPlayer, NoConstructor< CPlayer > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CPlayer::Cmp)
|
||||
.Func(_SC("_tostring"), &CPlayer::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CPlayer::Max)
|
||||
|
@ -168,11 +168,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CPlayer & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
@ -47,23 +47,6 @@ CVehicle::~CVehicle()
|
||||
/* ... */
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CVehicle::Cmp(const CVehicle & o) const
|
||||
{
|
||||
if (m_ID == o.m_ID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (m_ID > o.m_ID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const String & CVehicle::ToString() const
|
||||
{
|
||||
@ -1763,7 +1746,6 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
||||
Class< CVehicle, NoConstructor< CVehicle > >(vm, Typename::Str)
|
||||
// Meta-methods
|
||||
.SquirrelFunc(_SC("_typename"), &Typename::Fn)
|
||||
.Func(_SC("_cmp"), &CVehicle::Cmp)
|
||||
.Func(_SC("_tostring"), &CVehicle::ToString)
|
||||
// Static Values
|
||||
.SetStaticValue(_SC("MaxID"), CVehicle::Max)
|
||||
|
@ -105,11 +105,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to compare two instances of this type.
|
||||
*/
|
||||
Int32 Cmp(const CVehicle & o) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to convert an instance of this type to a string.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user