MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / InsertAt

Method InsertAt

Sources/Jazz2/Scripting/RegisterArray.cpp:753–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751 }
752
753 void CScriptArray::InsertAt(std::uint32_t index, void* value)
754 {
755 if (index > buffer->numElements) {
756 // If this is called from a script we raise a script exception
757 asIScriptContext* ctx = asGetActiveContext();
758 if (ctx) {
759 ctx->SetException("Index out of bounds");
760 }
761 return;
762 }
763
764 // Make room for the new element
765 Resize(1, index);
766
767 // Set the value of the new element
768 SetValue(index, value);
769 }
770
771 void CScriptArray::InsertAt(std::uint32_t index, const CScriptArray& arr)
772 {

Callers

nothing calls this directly

Calls 2

AtMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected