Ensures that the array has at most amount entries. Useful in cases where the initial allocation may be larger than the final result. Resize would create a lot of unneeded code in those cases.
| 760 | // Useful in cases where the initial allocation may be larger than the final result. |
| 761 | // Resize would create a lot of unneeded code in those cases. |
| 762 | void Clamp(unsigned int amount) |
| 763 | { |
| 764 | if (Count > amount) |
| 765 | { |
| 766 | // Deleting old entries |
| 767 | DoDelete(amount, Count - 1); |
| 768 | Count = amount; |
| 769 | } |
| 770 | } |
| 771 | void Alloc(unsigned int amount) |
| 772 | { |
| 773 | // first destroys all content and then rebuilds the array. |
no outgoing calls
no test coverage detected