summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-06 20:01:17 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:15 +0000
commit1941e4587bf6b38e2a8a1875329ed75b829b617f (patch)
tree92a7bc19a64d8e41cfc677161dda1d72eb212b1a /src/qml/jsruntime/qv4object_p.h
parente4a2b2885d1847624dcbc6b9e4dfdedf04767fe3 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h10
1 files changed, 5 insertions, 5 deletions
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<Value *>(this) + vtable()->inlinePropertyOffset + index};
+ return PropertyIndex{ this, reinterpret_cast<Value *>(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;