mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
construct QVarLengthArray<T>() with the right size instead of resizing it in QDBusMetaObjectGenerator::write()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f2514df245
commit
52fa383ec2
1 changed files with 2 additions and 2 deletions
|
@ -343,8 +343,8 @@ void QDBusMetaObjectGenerator::write(QDBusMetaObject *obj)
|
|||
if (className.isEmpty())
|
||||
className = QLatin1String("QDBusInterface");
|
||||
|
||||
QVarLengthArray<int> idata;
|
||||
idata.resize(sizeof(QDBusMetaObjectPrivate) / sizeof(int));
|
||||
static const int QDBusMetaObjectPrivateSize = (sizeof(QDBusMetaObjectPrivate) / sizeof(int));
|
||||
QVarLengthArray<int> idata(QDBusMetaObjectPrivateSize);
|
||||
|
||||
QDBusMetaObjectPrivate *header = reinterpret_cast<QDBusMetaObjectPrivate *>(idata.data());
|
||||
header->revision = qmetaobjectrevision;
|
||||
|
|
Loading…
Add table
Reference in a new issue