aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-09-23 11:15:52 +0200
committerLars Knoll <lars.knoll@qt.io>2018-09-27 08:33:52 +0000
commit1804fea8893c355dbd585e373cb9644387410a92 (patch)
treea1e0a43a74f9137b7bc1c9da0332e6c2e3984cde /src/qml/jsruntime/qv4internalclass.cpp
parent7fb4fc2ac7b56d3f60ceb8ae1175bd4596436cc7 (diff)
Refactor InternalClass::find()
Specialize find() into several methods for different purposes. Prepares for further cleanups and being able to split up getter and setter for accessor properties. Change-Id: Id4ec5509ac1a1361e2170bbfc2347b89b520c782 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass.cpp')
-rw-r--r--src/qml/jsruntime/qv4internalclass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp
index 602061bb6e..bd037ef8a6 100644
--- a/src/qml/jsruntime/qv4internalclass.cpp
+++ b/src/qml/jsruntime/qv4internalclass.cpp
@@ -343,8 +343,9 @@ static void addDummyEntry(InternalClass *newClass, PropertyHash::Entry e)
Heap::InternalClass *InternalClass::changeMember(PropertyKey identifier, PropertyAttributes data, uint *index)
{
data.resolve();
- uint idx = find(identifier);
- Q_ASSERT(idx != UINT_MAX);
+ PropertyHash::Entry *e = findEntry(identifier);
+ Q_ASSERT(e && e->index != UINT_MAX);
+ uint idx = e->index;
if (index)
*index = idx;