From 1941e4587bf6b38e2a8a1875329ed75b829b617f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 6 Apr 2018 20:01:17 +0200 Subject: Unify MemberData::Index and ArrayData::Index Both classes basically did the same thing. Unify them in a new PropertyIndex class. Change-Id: Ieb6fb670e4d204bf20ee4c0b70b4381c95c6268e Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4object_p.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/qml/jsruntime/qv4object_p.h') diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 7b1046d6ee..885ae020f2 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -97,12 +97,12 @@ DECLARE_EXPORTED_HEAP_OBJECT(Object, Base) { WriteBarrier::write(e, this, prop->data_ptr(), b->asReturnedValue()); } - QV4::MemberData::Index writablePropertyData(uint index) { + PropertyIndex writablePropertyData(uint index) { uint nInline = vtable()->nInlineProperties; if (index < nInline) - return { this, reinterpret_cast(this) + vtable()->inlinePropertyOffset + index}; + return PropertyIndex{ this, reinterpret_cast(this) + vtable()->inlinePropertyOffset + index}; index -= nInline; - return { memberData, memberData->values.values + index }; + return PropertyIndex{ memberData, memberData->values.values + index }; } const Value *propertyData(uint index) const { @@ -243,8 +243,8 @@ struct Q_QML_EXPORT Object: Managed { void getOwnProperty(String *name, PropertyAttributes *attrs, Property *p = nullptr); void getOwnProperty(uint index, PropertyAttributes *attrs, Property *p = nullptr); - MemberData::Index getValueOrSetter(String *name, PropertyAttributes *attrs); - ArrayData::Index getValueOrSetter(uint index, PropertyAttributes *attrs); + PropertyIndex getValueOrSetter(String *name, PropertyAttributes *attrs); + PropertyIndex getValueOrSetter(uint index, PropertyAttributes *attrs); bool hasProperty(String *name) const; bool hasProperty(uint index) const; -- cgit v1.2.3