diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-12-03 11:28:28 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-12-05 23:13:31 +0000 |
| commit | edbe05d1e586e1860b2b5b68888c414300b008d9 (patch) | |
| tree | a6b007baa5117603c8e10dfed9a2da97d58d3768 /src/corelib/kernel/qtimer.cpp | |
| parent | 3aba0845a99ab8d34effc2d82de79582998598c6 (diff) | |
Short live QtPrivate::fuzzyCompare()!
Extract Method QtPrivate::fuzzyCompare() from the qFuzzyCompare()
implementations that correctly validate the preconditions of the
public qFuzzyCompare() (QMarginsF, QSizeF, QPointF), so we can more
easily apply the same technique to other in-tree callers.
In the process, replace comparison to literal 0.0 with calls to
qIsNull() so we're a) insulated from -Wfloat-compare and b) have a
customization point to extend to types other than float and double.
Amends:
- 473d06970d224b202e7a8ee8feaa2a2d98d5b257 (QMarginsF)
- fa0d77e290f5ccb5afa7d02716f8726aa6b810e6 (QPointF)
- 3ca9877f8cae41e1b1cb3c72d4a7872d97fb8254 (QSizeF)
Pick-to: 6.10 6.8 6.5
Task-number: QTBUG-142020
Change-Id: Ib7ec06822f8006771a1c3a96145e98d574a29fbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions
