MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / Grow

Method Grow

src/util/bind-map.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56private:
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;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected