From 665f17782a984fa34934cb3fc6d8316a21da9862 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 25 Aug 2015 20:58:48 +0200 Subject: Simplify Object::getValue Object::getValue only needs the value/property getter. Because of this it's enough to pass it the Value stored in the member/arrayData and the property attributes. Like this we avoid the reinterpret_cast to a Property pointer. Change-Id: Ib6873526f9db22ed0e607e3617be5729b15271ab Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4arraydata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4arraydata.cpp') diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index da91db6aae..42b032f981 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -584,7 +584,7 @@ uint ArrayData::append(Object *obj, ArrayObject *otherObj, uint n) ScopedValue v(scope); for (const SparseArrayNode *it = os->sparse->begin(); it != os->sparse->end(); it = it->nextNode()) { - v = otherObj->getValue(reinterpret_cast(os->arrayData + it->value), other->d()->attrs[it->value]); + v = otherObj->getValue(os->arrayData[it->value], other->d()->attrs[it->value]); obj->arraySet(oldSize + it->key(), v); } } else { @@ -769,7 +769,7 @@ void ArrayData::sort(ExecutionEngine *engine, Object *thisObject, const Value &c break; PropertyAttributes a = sparse->attrs() ? sparse->attrs()[n->value] : Attr_Data; - d->data(i) = thisObject->getValue(reinterpret_cast(sparse->arrayData() + n->value), a); + d->data(i) = thisObject->getValue(sparse->arrayData()[n->value], a); d->attrs[i] = a.isAccessor() ? Attr_Data : a; n = n->nextNode(); -- cgit v1.2.3