MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / InsertAt

Method InsertAt

src/server/angelscript/add_on/scriptarray/scriptarray.cpp:792–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

Calls 3

SetExceptionMethod · 0.80
GetSizeMethod · 0.45
AtMethod · 0.45

Tested by

no test coverage detected