Remove "action" from Actor functions that don't actually need it
- An actor function really only needs to be an action function if:
1. It can be called with no parameters specified, either because it takes
none or because all its parameters are optional. This lets SetState()
call it directly without creating a wrapper function for it.
2. It wants access to the callingstate or stateowner parameters. Most
functions don't care about them, so passing them is superfluous.
This commit is contained in:
parent
322b9fc0ae
commit
39df62b20e
8 changed files with 245 additions and 255 deletions
|
|
@ -3844,7 +3844,7 @@ VMFunction *FxReturnStatement::GetDirectFunction()
|
|||
// then it can be a "direct" function. That is, the DECORATE
|
||||
// definition can call that function directly without wrapping
|
||||
// it inside VM code.
|
||||
if (Call != NULL && Call->GetArgCount() == 0)
|
||||
if (Call != NULL && Call->GetArgCount() == 0 && (Call->GetFunction()->Flags & VARF_Action))
|
||||
{
|
||||
return Call->GetVMFunction();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue