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

This commit is contained in:
Milo Yip 2015-04-10 22:06:56 +08:00
parent 1b9cab7f12
commit dfc864b1d3

View File

@ -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;