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