MCPcopy Create free account
hub / github.com/anjo76/angelscript / InsertAt

Method InsertAt

sdk/add_on/scriptarray/scriptarray.cpp:853–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

851}
852
853void CScriptArray::InsertAt(asUINT index, void *value)
854{
855 if( index > buffer->numElements )
856 {
857 // If this is called from a script we raise a script exception
858 asIScriptContext *ctx = asGetActiveContext();
859 if( ctx )
860 ctx->SetException("Index out of bounds");
861 return;
862 }
863
864 // Make room for the new element
865 Resize(1, index);
866
867 // Set the value of the new element
868 SetValue(index, value);
869}
870
871void CScriptArray::InsertAt(asUINT index, const CScriptArray &arr)
872{

Callers 2

Calls 4

ResizeFunction · 0.85
SetExceptionMethod · 0.80
GetSizeMethod · 0.45
AtMethod · 0.45

Tested by

no test coverage detected