diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2016-04-05 13:58:20 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2016-04-05 13:49:27 +0000 |
commit | f63f86f7d38a182b41a85af27bf0baba3db03941 (patch) | |
tree | bc9ebff4b5e0591c106b1bb47b1a1111224a1962 /src/qml/compiler | |
parent | 7c18dcf79abbcc4de085e73ca7abe4eeeb7f140c (diff) |
Replace qQNaN() and friends with qt_qnan().
These constexpr functions can be inlined, and the compiler can be a bit
smarter with code generation.
Change-Id: I4ea87c794dd8e375749e18d273d01bb848231113
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 3 | ||||
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index eafecae494..26b06561a8 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -55,6 +55,7 @@ #include <private/qqmljsastfwd_p.h> #include <private/qflagpointer_p.h> +#include <QtCore/private/qnumeric_p.h> #include <QtCore/QVector> #include <QtCore/QString> #include <QtCore/QBitArray> @@ -1344,7 +1345,7 @@ inline Expr *BasicBlock::CONST(Type type, double value) } else if (type == NullType) { value = 0; } else if (type == UndefinedType) { - value = qQNaN(); + value = qt_qnan(); } e->init(type, value); diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index f7cdd1b0b5..f021e1f760 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -2667,7 +2667,7 @@ void convertConst(Const *c, Type targetType) break; case NullType: case UndefinedType: - c->value = qQNaN(); + c->value = qt_qnan(); c->type = targetType; default: Q_UNIMPLEMENTED(); |