diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-09 01:00:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-12-09 10:16:01 +0100 |
commit | bef74b6c3a0a9c8649ea8eb333d80015f76863e4 (patch) | |
tree | 41cdf5b6776c90a6d04a1d6680f4d47a90593746 /src/corelib/tools/qeasingcurve.cpp | |
parent | f8d2975b6a8b36bf8dd304c99783947a72081b79 (diff) | |
parent | 4c3c63d4cbb81b38e88e06b72749e7e01497b6f1 (diff) |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
Diffstat (limited to 'src/corelib/tools/qeasingcurve.cpp')
-rw-r--r-- | src/corelib/tools/qeasingcurve.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index d7f69d3e0a..0ec51aa4d3 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -443,12 +443,12 @@ class QEasingCurvePrivate public: QEasingCurvePrivate() : type(QEasingCurve::Linear), - config(0), + config(nullptr), func(&easeNone) { } QEasingCurvePrivate(const QEasingCurvePrivate &other) : type(other.type), - config(other.config ? other.config->copy() : 0), + config(other.config ? other.config->copy() : nullptr), func(other.func) { } ~QEasingCurvePrivate() { delete config; } @@ -590,7 +590,7 @@ struct BezierEase : public QEasingCurveFunction if (!(x < 1)) return 1; - SingleCubicBezier *singleCubicBezier = 0; + SingleCubicBezier *singleCubicBezier = nullptr; getBezierSegment(singleCubicBezier, x); return evaluateSegmentForY(*singleCubicBezier, findTForX(*singleCubicBezier, x)); @@ -1097,7 +1097,7 @@ static QEasingCurve::EasingFunction curveToFunc(QEasingCurve::Type curve) case QEasingCurve::CosineCurve: return &easeCosineCurve; default: - return 0; + return nullptr; }; } @@ -1127,7 +1127,7 @@ static QEasingCurveFunction *curveToFunctionObject(QEasingCurve::Type type) return new QEasingCurveFunction(type, qreal(0.3), qreal(1.0), qreal(1.70158)); } - return 0; + return nullptr; } /*! @@ -1417,7 +1417,7 @@ void QEasingCurvePrivate::setType_helper(QEasingCurve::Type newType) tcbPoints = std::move(config->_tcbPoints); delete config; - config = 0; + config = nullptr; } if (isConfigFunction(newType) || (amp != -1.0) || (period != -1.0) || (overshoot != -1.0) || @@ -1431,11 +1431,11 @@ void QEasingCurvePrivate::setType_helper(QEasingCurve::Type newType) config->_o = overshoot; config->_bezierCurves = std::move(bezierCurves); config->_tcbPoints = std::move(tcbPoints); - func = 0; + func = nullptr; } else if (newType != QEasingCurve::Custom) { func = curveToFunc(newType); } - Q_ASSERT((func == 0) == (config != 0)); + Q_ASSERT((func == nullptr) == (config != nullptr)); type = newType; } @@ -1482,7 +1482,7 @@ void QEasingCurve::setCustomType(EasingFunction func) */ QEasingCurve::EasingFunction QEasingCurve::customType() const { - return d_ptr->type == Custom ? d_ptr->func : 0; + return d_ptr->type == Custom ? d_ptr->func : nullptr; } /*! |