diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-05-12 15:01:07 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-05-19 06:23:19 +0000 |
commit | cdbc4b83d59e08189d6ece9ccd88a646be155c08 (patch) | |
tree | ffd52e753313d8c3528fdab5a37bc089545b48aa /src/qml/jsruntime/qv4object_p.h | |
parent | 70a49fe042dd244926cc4a9cb6affb8b4f3d9b7f (diff) |
Properly encapsulate all accesses to the vtable
Change-Id: I3f6ae59d01c7b6c898e98d3b6f65b84a19b8851a
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.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index e1b2a40b94..78ee263c80 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -72,25 +72,25 @@ struct Object : Base { void destroy() { Base::destroy(); } const Value *inlinePropertyData(uint index) const { - Q_ASSERT(index < vt->nInlineProperties); - return reinterpret_cast<const Value *>(this) + vt->inlinePropertyOffset + index; + Q_ASSERT(index < vtable()->nInlineProperties); + return reinterpret_cast<const Value *>(this) + vtable()->inlinePropertyOffset + index; } Value *inlinePropertyData(uint index) { - Q_ASSERT(index < vt->nInlineProperties); - return reinterpret_cast<Value *>(this) + vt->inlinePropertyOffset + index; + Q_ASSERT(index < vtable()->nInlineProperties); + return reinterpret_cast<Value *>(this) + vtable()->inlinePropertyOffset + index; } const Value *propertyData(uint index) const { - uint nInline = vt->nInlineProperties; + uint nInline = vtable()->nInlineProperties; if (index < nInline) - return reinterpret_cast<const Value *>(this) + vt->inlinePropertyOffset + index; + return reinterpret_cast<const Value *>(this) + vtable()->inlinePropertyOffset + index; index -= nInline; return memberData->data + index; } Value *propertyData(uint index) { - uint nInline = vt->nInlineProperties; + uint nInline = vtable()->nInlineProperties; if (index < nInline) - return reinterpret_cast<Value *>(this) + vt->inlinePropertyOffset + index; + return reinterpret_cast<Value *>(this) + vtable()->inlinePropertyOffset + index; index -= nInline; return memberData->data + index; } |