• R/O
  • HTTP
  • SSH
  • HTTPS

Katie: Commit

C++ toolkit derived from the Qt 4.8 framework


Commit MetaInfo

Revision954f3147571ac500a9ddc24602e848250e866338 (tree)
Time2022-11-25 06:56:00
AuthorIvailo Monev <xakepa10@gmai...>
CommiterIvailo Monev

Log Message

remove redundant check in QEasingCurve::setType()

since QEasingCurve instances are no longer shared and no detaching is done
the check that was optimization to avoid detaching is no longer worth it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>

Change Summary

Incremental Difference

--- a/src/core/tools/qeasingcurve.cpp
+++ b/src/core/tools/qeasingcurve.cpp
@@ -281,7 +281,7 @@ QEasingCurve::QEasingCurve(Type type)
281281
282282 /*!
283283 Construct a copy of \a other.
284- */
284+*/
285285 QEasingCurve::QEasingCurve(const QEasingCurve &other)
286286 : d_ptr(new QEasingCurvePrivate(*other.d_ptr))
287287 {
@@ -361,7 +361,7 @@ void QEasingCurve::setAmplitude(qreal amplitude)
361361 Returns the period. This is not applicable for all curve types.
362362 It is only applicable if type() is QEasingCurve::InElastic, QEasingCurve::OutElastic,
363363 QEasingCurve::InOutElastic or QEasingCurve::OutInElastic.
364- */
364+*/
365365 qreal QEasingCurve::period() const
366366 {
367367 return d_ptr->per;
@@ -414,8 +414,6 @@ QEasingCurve::Type QEasingCurve::type() const
414414 */
415415 void QEasingCurve::setType(Type type)
416416 {
417- if (d_ptr->type == type)
418- return;
419417 if (Q_UNLIKELY(type < Linear || type >= QEasingCurve::NCurveTypes - 1)) {
420418 qWarning("QEasingCurve: Invalid curve type %d", type);
421419 return;
Show on old repository browser