| 9 | #include <iomanip> |
| 10 | |
| 11 | CoverageFile::CoverageFile(ContextCoverage *context) |
| 12 | : IntersectFile(context), |
| 13 | _depthArray(NULL), |
| 14 | _depthArrayCapacity(0), |
| 15 | _queryLen(0), |
| 16 | _totalQueryLen(0), |
| 17 | _hitCount(0), |
| 18 | _queryOffset(0), |
| 19 | _floatValBuf(NULL) |
| 20 | { |
| 21 | //allocate and initialize depth array. |
| 22 | //Use C's malloc and free becauase we want |
| 23 | //to be able to realloc. |
| 24 | //Not using vector because arrays are faster. |
| 25 | size_t newSize = sizeof(size_t) * DEFAULT_DEPTH_CAPACITY; |
| 26 | _depthArray = (size_t *)malloc(newSize); |
| 27 | memset(_depthArray, 0, newSize); |
| 28 | _depthArrayCapacity = DEFAULT_DEPTH_CAPACITY; |
| 29 | |
| 30 | _floatValBuf = new char[floatValBufLen]; |
| 31 | } |
| 32 | |
| 33 | CoverageFile::~CoverageFile() { |
| 34 | free(_depthArray); |
nothing calls this directly
no outgoing calls
no test coverage detected