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

Method InsertAt

external/as_add_on/scriptarray/scriptarray.cpp:791–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789}
790
791void CScriptArray::InsertAt(asUINT index, void *value)
792{
793 if( index > buffer->numElements )
794 {
795 // If this is called from a script we raise a script exception
796 asIScriptContext *ctx = asGetActiveContext();
797 if( ctx )
798 ctx->SetException("Index out of bounds");
799 return;
800 }
801
802 // Make room for the new element
803 Resize(1, index);
804
805 // Set the value of the new element
806 SetValue(index, value);
807}
808
809void CScriptArray::InsertAt(asUINT index, const CScriptArray &arr)
810{

Callers 2

Calls 2

GetSizeMethod · 0.45
AtMethod · 0.45

Tested by

no test coverage detected