aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-29 12:53:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-29 21:56:07 +0100
commitc32265bfc562db23b7c894306ec61fd22111a7b1 (patch)
treeb2d038b4fcc7ee5912bde4b71b56dff75a26eeaf /src/qml/jsruntime/qv4runtime_p.h
parentb9bf1f53395621deb106245cb80c7bbbce09b0ce (diff)
Inline unary operations in moth
Change-Id: I6e141a425c2b4cc0cd64c7f0011e7028b9147f69 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index f61a9805ac..54ade9384b 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -262,10 +262,10 @@ inline QV4::ReturnedValue __qmljs_uplus(const QV4::ValueRef value)
{
TRACE1(value);
- if (value->integerCompatible())
- return Encode(value->int_32);
+ if (value->integerCompatible() || value->isDouble())
+ return value.asReturnedValue();
- double n = value->toNumber();
+ double n = value->toNumberImpl();
return Encode(n);
}