diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-08 08:07:10 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-08 08:29:04 (GMT) |
commit | 470196c06f573a93e3229735496659eb99ca5b51 (patch) | |
tree | e5caeb2878fc7f13d3c5a635454819f3a329b45d /src/corelib | |
parent | 72f84ad17d0905f91e9d3988bb0f6482df6c6c78 (diff) | |
download | Qt-470196c06f573a93e3229735496659eb99ca5b51.zip Qt-470196c06f573a93e3229735496659eb99ca5b51.tar.gz Qt-470196c06f573a93e3229735496659eb99ca5b51.tar.bz2 |
Rename qIsFuzzyNull to qFuzzyIsNull
The function was added in fde7f3d03782c801901f511131458d6fcb1021a5
and we believe qFuzzyIsNull is a better naming and more in line
with qFuzzyCompare.
Reviewed-by: Lars Knoll
Reviewed-by: nrc
Reviewed-by: Samuel
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qsize.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 28b9d08..5fd05c0 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1709,7 +1709,7 @@ static inline bool qFuzzyCompare(float p1, float p2) /*! \internal */ -static inline bool qIsFuzzyNull(double d) +static inline bool qFuzzyIsNull(double d) { return qAbs(d) <= 0.000000000001; } @@ -1717,7 +1717,7 @@ static inline bool qIsFuzzyNull(double d) /*! \internal */ -static inline bool qIsFuzzyNull(float f) +static inline bool qFuzzyIsNull(float f) { return qAbs(f) <= 0.00001f; } diff --git a/src/corelib/tools/qsize.h b/src/corelib/tools/qsize.h index df2c183..34a6c99 100644 --- a/src/corelib/tools/qsize.h +++ b/src/corelib/tools/qsize.h @@ -171,14 +171,14 @@ inline const QSize operator*(qreal c, const QSize &s) inline QSize &QSize::operator/=(qreal c) { - Q_ASSERT(!qIsFuzzyNull(c)); + Q_ASSERT(!qFuzzyIsNull(c)); wd = qRound(wd/c); ht = qRound(ht/c); return *this; } inline const QSize operator/(const QSize &s, qreal c) { - Q_ASSERT(!qIsFuzzyNull(c)); + Q_ASSERT(!qFuzzyIsNull(c)); return QSize(qRound(s.wd/c), qRound(s.ht/c)); } @@ -327,14 +327,14 @@ inline const QSizeF operator*(qreal c, const QSizeF &s) inline QSizeF &QSizeF::operator/=(qreal c) { - Q_ASSERT(!qIsFuzzyNull(c)); + Q_ASSERT(!qFuzzyIsNull(c)); wd = wd/c; ht = ht/c; return *this; } inline const QSizeF operator/(const QSizeF &s, qreal c) { - Q_ASSERT(!qIsFuzzyNull(c)); + Q_ASSERT(!qFuzzyIsNull(c)); return QSizeF(s.wd/c, s.ht/c); } |