Resize Array so that it has exactly amount entries in use.
| 350 | } |
| 351 | // Resize Array so that it has exactly amount entries in use. |
| 352 | void Resize (unsigned int amount) |
| 353 | { |
| 354 | if (Count < amount) |
| 355 | { |
| 356 | // Adding new entries |
| 357 | Grow (amount - Count); |
| 358 | for (unsigned int i = Count; i < amount; ++i) |
| 359 | { |
| 360 | ::new((void *)&Array[i]) T; |
| 361 | } |
| 362 | } |
| 363 | else if (Count != amount) |
| 364 | { |
| 365 | // Deleting old entries |
| 366 | DoDelete (amount, Count - 1); |
| 367 | } |
| 368 | Count = amount; |
| 369 | } |
| 370 | // Reserves amount entries at the end of the array, but does nothing |
| 371 | // with them. |
| 372 | unsigned int Reserve (unsigned int amount) |
nothing calls this directly
no outgoing calls
no test coverage detected