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/quick/util/qquickpath.cpp | |
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/quick/util/qquickpath.cpp')
-rw-r--r-- | src/quick/util/qquickpath.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp index 062411e0a9..6b491a433c 100644 --- a/src/quick/util/qquickpath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -46,7 +46,7 @@ #include <private/qbezier_p.h> #include <QtCore/qmath.h> -#include <QtCore/qnumeric.h> +#include <QtCore/private/qnumeric_p.h> QT_BEGIN_NAMESPACE @@ -560,7 +560,7 @@ void QQuickPath::createPointCache() const { Q_D(const QQuickPath); qreal pathLength = d->pathLength; - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return; const int segments = segmentCount(d->_path, pathLength); @@ -633,7 +633,7 @@ QPointF QQuickPath::sequentialPointAt(const QPainterPath &path, const qreal &pat QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return path.pointAtPercent(0); //expensive? const int lastElement = path.elementCount() - 1; @@ -689,7 +689,7 @@ QPointF QQuickPath::forwardsPointAt(const QPainterPath &path, const qreal &pathL //ideally this should be merged with forwardsPointAt QPointF QQuickPath::backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList<AttributePoint> &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle) { - if (pathLength <= 0 || qIsNaN(pathLength)) + if (pathLength <= 0 || qt_is_nan(pathLength)) return path.pointAtPercent(0); const int firstElement = 1; //element 0 is always a MoveTo, which we ignore |