| 160 | Array(Allocator* allocator) : allocator(allocator), buffer(NULL), size(0), capacity(0) {} |
| 161 | |
| 162 | void PushBack(const T& val) |
| 163 | { |
| 164 | ASSERT(&val < buffer || &val >= buffer + size); |
| 165 | |
| 166 | int old_size = size; |
| 167 | int new_size = size + 1; |
| 168 | |
| 169 | SetSize(new_size); |
| 170 | |
| 171 | ConstructRange(buffer, new_size, old_size, val); |
| 172 | } |
| 173 | T& PushBackNew() |
| 174 | { |
| 175 | int old_size = size; |
no test coverage detected