| 179 | } |
| 180 | |
| 181 | __forceinline void resize(size_t M) |
| 182 | { |
| 183 | assert(M <= max_total_elements); |
| 184 | if (likely(M <= max_stack_elements)) return; |
| 185 | if (likely(!isStackAllocated())) return; |
| 186 | |
| 187 | data = new Ty[max_total_elements]; |
| 188 | |
| 189 | for (size_t i=0; i<max_stack_elements; i++) |
| 190 | data[i] = arr[i]; |
| 191 | } |
| 192 | |
| 193 | __forceinline operator Ty* () { return data; } |
| 194 | __forceinline operator const Ty* () const { return data; } |
no test coverage detected