Commit dfc864b1 authored by Milo Yip's avatar Milo Yip

Fix a bug in Pointer::Create() which makes it very slow

parent 1b9cab7f
......@@ -173,7 +173,7 @@ public:
if (t->index == kInvalidIndex)
v->SetArray(); // Change to Array
if (t->index >= v->Size()) {
v->Reserve(t->index - 1, allocator);
v->Reserve(t->index + 1, allocator);
while (t->index >= v->Size())
v->PushBack(Value().Move(), allocator);
exist = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment