From 3fbe74cb0b6f01ca930bf4f22f25b4976cbe1ac3 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 1 Oct 2013 09:55:50 +0200 Subject: [PATCH] V4: fix ArrayPrototype::method_isArray() build break With a recent Clang in C++11 mode: error: incompatible operand types ('QV4::ArrayObject *' and 'bool') Task-number: QTBUG-33706 Change-Id: I7bd4fe01176745fb6f8dbdf8f271edb7121eb35e Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4arrayobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index 8687ca4..6f19597 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -133,7 +133,7 @@ uint ArrayPrototype::getLength(ExecutionContext *ctx, ObjectRef o) ReturnedValue ArrayPrototype::method_isArray(SimpleCallContext *ctx) { - bool isArray = ctx->callData->argc ? ctx->callData->args[0].asArrayObject() : false; + bool isArray = ctx->callData->argc && ctx->callData->args[0].asArrayObject(); return Encode(isArray); } -- 2.7.4