QMetaObjectBuilder: replace an inefficient QList with QVector

ints are only half the size of void* on 64-bit, so
QVector<int> uses only 50% of per-element memory,
compared to a QList.

Saves ~1800B of text size on GCC 4.9 optimized C++11 AMD64
Linux builds, even though it wasn't the last instance of
QList<int> in QtCore, yet.

Change-Id: Ibf04b26cff78c428e4253aaab7c280866906db58
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This commit is contained in:
Marc Mutz 2015-06-13 20:36:20 +02:00
parent d4cee10bf8
commit b9331eff91

View File

@ -193,7 +193,7 @@ public:
QByteArray name;
bool isFlag;
QList<QByteArray> keys;
QList<int> values;
QVector<int> values;
};
Q_DECLARE_TYPEINFO(QMetaEnumBuilderPrivate, Q_MOVABLE_TYPE);