* Resize the array to new size * * @param NewSize - new size of the array */
| 255 | * @param NewSize - new size of the array |
| 256 | */ |
| 257 | FORCEINLINE void Resize(int32 NewSize) |
| 258 | { |
| 259 | if (NewSize >= 0) |
| 260 | { |
| 261 | int32 Count = NewSize - Num(); |
| 262 | if (Count > 0) |
| 263 | { |
| 264 | AddDefaulted(Count); |
| 265 | } |
| 266 | else if (Count < 0) |
| 267 | { |
| 268 | Destruct(NewSize, -Count); |
| 269 | ScriptArray->Remove(NewSize, -Count, ElementSize ALIGNMENT_PLACEHOLDER); |
| 270 | } |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * Get value of the i'th element |
no test coverage detected