1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Reuse method.

This commit is contained in:
Sandu Liviu Catalin 2022-03-09 22:41:00 +02:00
parent da139c6a81
commit 7e39fab21a
2 changed files with 4 additions and 20 deletions

View File

@ -263,7 +263,7 @@ void Register_XML(HSQUIRRELVM vm)
.Prop(_SC("Next"), &XmlAttribute::NextAttribute)
.Prop(_SC("Prev"), &XmlAttribute::PrevAttribute)
// Member Methods
.Func(_SC("SetName"), &XmlAttribute::ApplyName)
.Func(_SC("SetName"), &XmlAttribute::SetName)
.Func(_SC("SetValue"), &XmlAttribute::ApplyValue)
.Func(_SC("AsString"), &XmlAttribute::AsString)
.Func(_SC("AsInt"), &XmlAttribute::AsInt)
@ -354,7 +354,7 @@ void Register_XML(HSQUIRRELVM vm)
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer1)
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer2)
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer3)
.Func(_SC("SetName"), &XmlNode::ApplyName)
.Func(_SC("SetName"), &XmlNode::SetName)
.Func(_SC("SetValue"), &XmlNode::ApplyValue)
.Func(_SC("GetChild"), &XmlNode::Child)
.Func(_SC("GetAttr"), &XmlNode::GetAttribute)

View File

@ -781,19 +781,11 @@ public:
{
if (!m_Node.set_name(name.mPtr))
{
STHROWF("Unable to set XML node name");
STHROWF("Unable to set XML node name `{s}`", name.ToStr());
}
return *this;
}
/* --------------------------------------------------------------------------------------------
* Modify the node name.
*/
bool ApplyName(StackStrF & name)
{
return m_Node.set_name(name.mPtr);
}
/* --------------------------------------------------------------------------------------------
* Retrieve node value.
*/
@ -1337,19 +1329,11 @@ public:
{
if (!m_Attr.set_name(name.mPtr))
{
STHROWF("Unable to set XML attribute name");
STHROWF("Unable to set XML attribute name `{s}`", name.ToStr());
}
return *this;
}
/* --------------------------------------------------------------------------------------------
* Modify the attribute name.
*/
bool ApplyName(StackStrF & name)
{
return m_Attr.set_name(name.mPtr);
}
/* --------------------------------------------------------------------------------------------
* Retrieve attribute value.
*/