diff --git a/src/corelib/json/qjsonparser_p.h b/src/corelib/json/qjsonparser_p.h index 98b23dc9c5..a395c0c92e 100644 --- a/src/corelib/json/qjsonparser_p.h +++ b/src/corelib/json/qjsonparser_p.h @@ -62,12 +62,14 @@ public: class ParsedObject { public: - ParsedObject(Parser *p, int pos) : parser(p), objectPosition(pos) {} + ParsedObject(Parser *p, int pos) : parser(p), objectPosition(pos) { + offsets.reserve(64); + } void insert(uint offset); Parser *parser; int objectPosition; - QVarLengthArray offsets; + QVector offsets; inline QJsonPrivate::Entry *entryAt(int i) const { return reinterpret_cast(parser->data + objectPosition + offsets[i]);