| 790 | } |
| 791 | |
| 792 | void 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 | |
| 810 | void CScriptArray::InsertAt(asUINT index, const CScriptArray &arr) |
| 811 | { |
no test coverage detected