mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-06-06 10:52:13 +03:00
Optimize void return in squirrel function call stub
This commit is contained in:
parent
1ecaa44c49
commit
8e8bdfc371
@ -1429,9 +1429,16 @@ SQInteger function_stub(HSQUIRRELVM vm)
|
|||||||
{
|
{
|
||||||
Assert(script_retval.m_type == pFunc->m_desc.m_ReturnType);
|
Assert(script_retval.m_type == pFunc->m_desc.m_ReturnType);
|
||||||
|
|
||||||
|
if (pFunc->m_desc.m_ReturnType != FIELD_VOID)
|
||||||
|
{
|
||||||
PushVariant(vm, script_retval);
|
PushVariant(vm, script_retval);
|
||||||
sq_retval = 1;
|
sq_retval = 1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sq_retval = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// strings never get copied here, Vector and QAngle are stored in script_retval_storage
|
// strings never get copied here, Vector and QAngle are stored in script_retval_storage
|
||||||
// everything else is stored inline, so there should be no memory to free
|
// everything else is stored inline, so there should be no memory to free
|
||||||
|
Loading…
x
Reference in New Issue
Block a user