Resize array
| 53 | |
| 54 | // Resize array |
| 55 | void Array1::resize(int length, long* data) |
| 56 | { |
| 57 | if (length < 0) throw std::invalid_argument("Array1 length less than 0"); |
| 58 | if (length == _length) return; |
| 59 | deallocateMemory(); |
| 60 | _length = length; |
| 61 | if (!data) |
| 62 | { |
| 63 | allocateMemory(); |
| 64 | } |
| 65 | else |
| 66 | { |
| 67 | _ownData = false; |
| 68 | _buffer = data; |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // Set item accessor |
| 73 | long & Array1::operator[](int i) |
no outgoing calls
no test coverage detected