| 851 | } |
| 852 | |
| 853 | void CScriptArray::InsertAt(asUINT index, void *value) |
| 854 | { |
| 855 | if( index > buffer->numElements ) |
| 856 | { |
| 857 | // If this is called from a script we raise a script exception |
| 858 | asIScriptContext *ctx = asGetActiveContext(); |
| 859 | if( ctx ) |
| 860 | ctx->SetException("Index out of bounds"); |
| 861 | return; |
| 862 | } |
| 863 | |
| 864 | // Make room for the new element |
| 865 | Resize(1, index); |
| 866 | |
| 867 | // Set the value of the new element |
| 868 | SetValue(index, value); |
| 869 | } |
| 870 | |
| 871 | void CScriptArray::InsertAt(asUINT index, const CScriptArray &arr) |
| 872 | { |
no test coverage detected