| 2782 | } |
| 2783 | |
| 2784 | ResultType Script::LineBuffer::Realloc(size_t aNewSize) |
| 2785 | { |
| 2786 | // The buffer typically needs to grow incrementally while joining lines in a continuation section. |
| 2787 | // Expanding in large increments avoids multiple reallocs in most files. |
| 2788 | size_t newsize = (aNewSize + EXPANSION_INTERVAL - 1) / EXPANSION_INTERVAL * EXPANSION_INTERVAL; |
| 2789 | LPTSTR newp = (LPTSTR)realloc(p, sizeof(TCHAR) * newsize); |
| 2790 | if (!newp) |
| 2791 | return FAIL; |
| 2792 | p = newp; |
| 2793 | size = newsize; |
| 2794 | return OK; |
| 2795 | } |
| 2796 | |
| 2797 | |
| 2798 |
nothing calls this directly
no outgoing calls
no test coverage detected