| 77 | ObjectBlockPool<AreaLine, 32>* AreaLine::pool = NULL; |
| 78 | |
| 79 | void ExtendLine(AreaLine *line, unsigned int size) |
| 80 | { |
| 81 | // If there isn't enough space |
| 82 | if(size > line->maxLength) |
| 83 | { |
| 84 | AreaChar *nChars = new AreaChar[size + size / 2]; |
| 85 | line->maxLength = size + size / 2; |
| 86 | // Clear memory |
| 87 | memset(nChars, 0, sizeof(AreaChar) * line->maxLength); |
| 88 | // Copy old data |
| 89 | memcpy(nChars, line->data, line->length * sizeof(AreaChar)); |
| 90 | // Delete old data if it's not an internal buffer |
| 91 | if(line->data != line->startBuf) |
| 92 | delete[] line->data; |
| 93 | line->data = nChars; |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | AreaLine* InsertLineAfter(AreaLine *curr) |
| 98 | { |
no outgoing calls
no test coverage detected