| 44 | |
| 45 | |
| 46 | void dArrayBase::_setSize (int newsize, int sizeofT) |
| 47 | { |
| 48 | if (newsize < 0) return; |
| 49 | if (newsize > _anum) { |
| 50 | if (_data == this+1) { |
| 51 | // this is a no-no, because constructLocalArray() was called |
| 52 | dDebug (0,"setSize() out of space in LOCAL array"); |
| 53 | } |
| 54 | int newanum = roundUpToPowerOfTwo (newsize); |
| 55 | if (_data) _data = dRealloc (_data, _anum*sizeofT, newanum*sizeofT); |
| 56 | else _data = dAlloc (newanum*sizeofT); |
| 57 | _anum = newanum; |
| 58 | } |
| 59 | _size = newsize; |
| 60 | } |
| 61 | |
| 62 | |
| 63 | void * dArrayBase::operator new (size_t size) |
nothing calls this directly
no test coverage detected