diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-26 08:55:32 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-15 19:13:12 +0000 |
commit | 7d52d7e529ff83426ffd57330cab70b9d77c39df (patch) | |
tree | 4a5ba620397e1df203c64b20351b8197062f6ab4 /src/qml/jsruntime/qv4object_p.h | |
parent | e13b9624b09cf192f9af8cb2f24c5551478ed6d3 (diff) |
Don't return Property * from ArrayData::insert
Change-Id: Ibabee04a17f5b2f3ba993cd61cbe64c897031f71
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index f427b676d6..790319765d 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -440,10 +440,7 @@ inline void Object::arraySet(uint index, const Property *p, PropertyAttributes a arrayData()->vtable()->reallocate(this, index + 1, false); } setArrayAttributes(index, attributes); - Property *pd = ArrayData::insert(this, index, attributes.isAccessor()); - pd->value = p->value; - if (attributes.isAccessor()) - pd->set = p->set; + ArrayData::insert(this, index, &p->value, attributes.isAccessor()); if (isArrayObject() && index >= getLength()) setArrayLengthUnchecked(index + 1); } @@ -455,8 +452,7 @@ inline void Object::arraySet(uint index, const Value &value) if (index > 0x1000 && index > 2*d()->arrayData->alloc) { initSparseArray(); } - Property *pd = ArrayData::insert(this, index); - pd->value = value; + ArrayData::insert(this, index, &value); if (isArrayObject() && index >= getLength()) setArrayLengthUnchecked(index + 1); } |