Stores a Native value into the array. If the index is out of range, returns false. */
| 78 | /** Stores a Native value into the array. |
| 79 | If the index is out of range, returns false. */ |
| 80 | bool set(size_t i, Native val) { |
| 81 | if (_usuallyFalse(!MCollection::isMutable())) |
| 82 | return false; |
| 83 | if (_usuallyFalse(i >= count() || val == nullptr)) |
| 84 | return false; |
| 85 | MCollection::mutate(); |
| 86 | _vec[i] = val; |
| 87 | return true; |
| 88 | } |
| 89 | |
| 90 | /** Inserts the value `val` into the array at index `i`, |
| 91 | or returns false if the array is out of range (greater than the count.) */ |
nothing calls this directly
no outgoing calls
no test coverage detected