mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
tscript change
Adds the ability to declare defaults for function arguments
eg
function testFunc(%x = 1, %y = 1)
{
return %x + %y;
}
can now be called as
testFunc(10) and it will return the value of 11.
This commit is contained in:
parent
7e64493dbf
commit
b0f8a5f9bd
8 changed files with 1375 additions and 1206 deletions
|
|
@ -671,10 +671,15 @@ Namespace::Entry::Entry()
|
|||
mNext = NULL;
|
||||
mPackage = StringTable->EmptyString();
|
||||
mToolOnly = false;
|
||||
VECTOR_SET_ASSOCIATION(mArgFlags);
|
||||
VECTOR_SET_ASSOCIATION(mDefaultValues);
|
||||
}
|
||||
|
||||
void Namespace::Entry::clear()
|
||||
{
|
||||
mArgFlags.clear();
|
||||
mDefaultValues.clear();
|
||||
|
||||
if (mModule)
|
||||
{
|
||||
mModule->decRefCount();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue