aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-25 10:27:02 +0100
committerLars Knoll <lars.knoll@qt.io>2016-11-29 20:00:29 +0000
commit46941afcc10209905a92e6bb8b3eba7c08bf6750 (patch)
tree85f11182e9656668aaeda6e5adcce6b1418fb672 /src/qml/jsruntime/qv4engine.cpp
parent5d35573a62686aa3b0c45fc032b79670d88ebba9 (diff)
Cleanup Value::isObject/objectValue usages
Try to avoid calling both as objectValue() already checks isObject(). Change-Id: I1d770d4d9dabed4ea4cc3e322b8fdc5a64f5bd2b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 634b8a3e6b..5c79c4ea97 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1704,10 +1704,10 @@ bool ExecutionEngine::metaTypeFromJS(const Value *value, int type, void *data)
// We have T t, T* is requested, so return &t.
*reinterpret_cast<void* *>(data) = var.data();
return true;
- } else if (value->isObject()) {
+ } else if (Object *o = value->objectValue()) {
// Look in the prototype chain.
QV4::Scope scope(this);
- QV4::ScopedObject proto(scope, value->objectValue()->prototype());
+ QV4::ScopedObject proto(scope, o->prototype());
while (proto) {
bool canCast = false;
if (QV4::VariantObject *vo = proto->as<QV4::VariantObject>()) {