MCPcopy Create free account
hub / github.com/ZDoom/Raze / VMCallWithDefaults

Function VMCallWithDefaults

source/common/scripting/vm/vmframe.cpp:616–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616int VMCallWithDefaults(VMFunction *func, TArray<VMValue> &params, VMReturn *results, int numresults/*, VMException **trap = NULL*/)
617{
618 if (func->DefaultArgs.Size() > params.Size())
619 {
620 auto oldp = params.Size();
621 params.Resize(func->DefaultArgs.Size());
622 for (unsigned i = oldp; i < params.Size(); i++)
623 {
624 params[i] = func->DefaultArgs[i];
625 }
626 }
627 return VMCall(func, params.Data(), params.Size(), results, numresults);
628}
629
630
631// Exception stuff for the VM is intentionally placed there, because having this in vmexec.cpp would subject it to inlining

Callers 3

DoParseListMenuBodyFunction · 0.85
ParseOptionMenuBodyFunction · 0.85
ParseImageScrollerBodyFunction · 0.85

Calls 4

VMCallFunction · 0.85
SizeMethod · 0.45
ResizeMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected