| 56 | private: |
| 57 | |
| 58 | void Grow(Napi::Env env) { |
| 59 | assert(capacity == length); |
| 60 | capacity = (capacity << 1) | 2; |
| 61 | Pair* new_pairs = ALLOC_ARRAY<Pair>(capacity); |
| 62 | for (int i = 0; i < length; ++i) { |
| 63 | new (new_pairs + i) Pair(env, pairs + i); |
| 64 | pairs[i].~Pair(); |
| 65 | } |
| 66 | FREE_ARRAY<Pair>(pairs); |
| 67 | pairs = new_pairs; |
| 68 | } |
| 69 | |
| 70 | Pair* pairs; |
| 71 | int capacity; |
nothing calls this directly
no outgoing calls
no test coverage detected