diff options
author | Lars Knoll <[email protected]> | 2015-08-25 20:58:48 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2015-09-15 19:13:03 +0000 |
commit | 665f17782a984fa34934cb3fc6d8316a21da9862 (patch) | |
tree | f222f4e26a09b5a30af6a0c22f94ff482bca56e7 /src/qml/jsruntime/qv4arraydata.cpp | |
parent | 9ea6c69ab5e18cc4bb703f6d3572e7ddc87e34a5 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arraydata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Property *>(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<Property *>(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(); |