aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-02-06 14:57:52 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-07 10:44:27 +0100
commitcd3736db10a8105d8dca09327b6efb139ce2ed1b (patch)
tree1d8203f048556beb2cf49c363a9e44d8fce695a1 /src
parent6b1fdf8ddaca6a25bf0aca7aff78f9594c29528f (diff)
Avoid some unary plus instructions
Change-Id: Ie01ef2be8beb890b1ca56bbdc990ccea87c1d91e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index e67e351ba7..79077b6797 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -337,7 +337,7 @@ void InstructionSelection::callSubscript(V4IR::Expr *base, V4IR::Expr *index, V4
void InstructionSelection::convertType(V4IR::Temp *source, V4IR::Temp *target)
{
// FIXME: do something more useful with this info
- if (target->type & V4IR::NumberType)
+ if (target->type & V4IR::NumberType && !(source->type & V4IR::NumberType))
unop(V4IR::OpUPlus, source, target);
else
copyValue(source, target);