Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
Implements the JavaScript double-to-int coercion. More...
#include <qjsnumbercoercion.h>
Static Public Member Functions | |
static constexpr bool | isInteger (double d) |
static constexpr bool | isArrayIndex (double d) |
static constexpr bool | isArrayIndex (qint64 i) |
static constexpr bool | isArrayIndex (quint64 i) |
static constexpr int | toInteger (double d) |
static constexpr bool | equals (double lhs, double rhs) |
Implements the JavaScript double-to-int coercion.
Definition at line 12 of file qjsnumbercoercion.h.
|
inlinestaticconstexpr |
Definition at line 60 of file qjsnumbercoercion.h.
References QT_WARNING_DISABLE_FLOAT_COMPARE, QT_WARNING_POP, and QT_WARNING_PUSH.
Referenced by isArrayIndex(), isInteger(), QQmlPrivate::jsExponentiate(), QJSPrimitiveValue::strictlyEquals(), QJSPrimitiveValue::toBoolean(), and toInteger().
|
inlinestaticconstexpr |
Checks whether d contains a value that can serve as an index into an array. For that, d must be a non-negative value representable as an unsigned 32bit int.
Definition at line 28 of file qjsnumbercoercion.h.
|
inlinestaticconstexpr |
Checks whether i contains a value that can serve as an index into an array. For that, d must be a non-negative value representable as an unsigned 32bit int.
Definition at line 36 of file qjsnumbercoercion.h.
References i.
|
inlinestaticconstexpr |
Checks whether i contains a value that can serve as an index into an array. For that, d must be a value representable as an unsigned 32bit int.
Definition at line 41 of file qjsnumbercoercion.h.
References i.
|
inlinestaticconstexpr |
Definition at line 16 of file qjsnumbercoercion.h.
Referenced by QQmlLocaleValueType::toString().
|
inlinestaticconstexpr |
Coerces the given d to a 32bit integer by JavaScript rules and returns the result.
Definition at line 46 of file qjsnumbercoercion.h.
References d, equals(), i, and toInteger().
Referenced by toInteger().