diff options
author | Lars Knoll <[email protected]> | 2014-11-14 09:31:59 +0100 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2014-11-22 07:56:58 +0100 |
commit | 6d2904ce547757fa554cdab6724a088c80abf5ac (patch) | |
tree | f3cd50654b8a140d843656961d107db6231bdce3 /src/qml/jsruntime/qv4object.cpp | |
parent | 9f717b650ea0a7efc4240240f957beba8d027bda (diff) |
Remove two reinterpret_casts in Object
Change-Id: I921cd8129acb47cffd58be9551a6925c4f296d41
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 78614eeffb..755f6993ac 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -468,7 +468,7 @@ void Object::setLookup(Managed *m, Lookup *l, const ValueRef value) l->classList[0] = o->internalClass(); l->index = idx; l->setter = Lookup::setter0; - o->memberData()->data()[idx] = *value; + o->memberData()->data[idx] = *value; return; } @@ -1158,7 +1158,7 @@ ReturnedValue ArrayObject::getLookup(Managed *m, Lookup *l) // special case, as the property is on the object itself l->getter = Lookup::arrayLengthGetter; ArrayObject *a = static_cast<ArrayObject *>(m); - return a->memberData()->data()[Heap::ArrayObject::LengthPropertyIndex].asReturnedValue(); + return a->memberData()->data[Heap::ArrayObject::LengthPropertyIndex].asReturnedValue(); } return Object::getLookup(m, l); } @@ -1166,9 +1166,9 @@ ReturnedValue ArrayObject::getLookup(Managed *m, Lookup *l) uint ArrayObject::getLength(const Managed *m) { const ArrayObject *a = static_cast<const ArrayObject *>(m); - if (a->memberData()->data()[Heap::ArrayObject::LengthPropertyIndex].isInteger()) - return a->memberData()->data()[Heap::ArrayObject::LengthPropertyIndex].integerValue(); - return Primitive::toUInt32(a->memberData()->data()[Heap::ArrayObject::LengthPropertyIndex].doubleValue()); + if (a->memberData()->data[Heap::ArrayObject::LengthPropertyIndex].isInteger()) + return a->memberData()->data[Heap::ArrayObject::LengthPropertyIndex].integerValue(); + return Primitive::toUInt32(a->memberData()->data[Heap::ArrayObject::LengthPropertyIndex].doubleValue()); } QStringList ArrayObject::toQStringList() const |