Insert a single value into the buffer. Inserting at positions outside the current range fails.
| 152 | /// Insert a single value into the buffer. |
| 153 | /// Inserting at positions outside the current range fails. |
| 154 | void Insert(int position, T v) { |
| 155 | PLATFORM_ASSERT((position >= 0) && (position <= lengthBody)); |
| 156 | if ((position < 0) || (position > lengthBody)) { |
| 157 | return; |
| 158 | } |
| 159 | RoomFor(1); |
| 160 | GapTo(position); |
| 161 | body[part1Length] = v; |
| 162 | lengthBody++; |
| 163 | part1Length++; |
| 164 | gapLength--; |
| 165 | } |
| 166 | |
| 167 | /// Insert a number of elements into the buffer setting their value. |
| 168 | /// Inserting at positions outside the current range fails. |
nothing calls this directly
no outgoing calls
no test coverage detected