CPropertyDelegate: Make use of push_back over operator<<

This commit is contained in:
Lioncash 2020-07-10 12:03:41 -04:00
parent 6f35e8c760
commit cc668e514b
1 changed files with 2 additions and 5 deletions

View File

@ -368,15 +368,12 @@ void CPropertyDelegate::setModelData(QWidget *pEditor, QAbstractItemModel* /*pMo
if (!pObject) if (!pObject)
{ {
QVector<void*> DataPointers; const QVector<void*> DataPointers{pData};
DataPointers << pData;
pCommand = new CEditIntrinsicPropertyCommand(pProp, DataPointers, mpModel, rkIndex); pCommand = new CEditIntrinsicPropertyCommand(pProp, DataPointers, mpModel, rkIndex);
} }
else else
{ {
QVector<CScriptObject*> Objects; const QVector<CScriptObject*> Objects{pObject};
Objects << pObject;
pCommand = (Type != EPropertyType::Array) ? pCommand = (Type != EPropertyType::Array) ?
new CEditScriptPropertyCommand(pProp, Objects, mpModel, rkIndex) : new CEditScriptPropertyCommand(pProp, Objects, mpModel, rkIndex) :
new CResizeScriptArrayCommand (pProp, Objects, mpModel, rkIndex); new CResizeScriptArrayCommand (pProp, Objects, mpModel, rkIndex);