MCPcopy Create free account
hub / github.com/CytopiaTeam/Cytopia / Create

Method Create

external/as_add_on/scriptarray/scriptarray.cpp:63–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63CScriptArray* CScriptArray::Create(asITypeInfo *ti, asUINT length)
64{
65 // Allocate the memory
66 void *mem = userAlloc(sizeof(CScriptArray));
67 if( mem == 0 )
68 {
69 asIScriptContext *ctx = asGetActiveContext();
70 if( ctx )
71 ctx->SetException("Out of memory");
72
73 return 0;
74 }
75
76 // Initialize the object
77 CScriptArray *a = new(mem) CScriptArray(length, ti);
78
79 return a;
80}
81
82CScriptArray* CScriptArray::Create(asITypeInfo *ti, void *initList)
83{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected