| 70 | } |
| 71 | |
| 72 | void Resize(uint64 numElements) |
| 73 | { |
| 74 | if(numElements == size) |
| 75 | return; |
| 76 | |
| 77 | if(numElements == 0) |
| 78 | { |
| 79 | Shutdown(); |
| 80 | return; |
| 81 | } |
| 82 | |
| 83 | T* newData = new T[numElements]; |
| 84 | for(uint64 i = 0; i < size; ++i) |
| 85 | newData[i] = data[i]; |
| 86 | |
| 87 | Shutdown(); |
| 88 | data = newData; |
| 89 | size = numElements; |
| 90 | } |
| 91 | |
| 92 | uint64 Size() const |
| 93 | { |
no test coverage detected