diff options
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 49577caba2..e04d9fdefa 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -783,26 +783,22 @@ typedef void (*QFunctionPointer)(); # define Q_UNIMPLEMENTED() qWarning("Unimplemented code.") #endif -Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) Q_REQUIRED_RESULT Q_DECL_UNUSED; -Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(double p1, double p2) +Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(double p1, double p2) { return (qAbs(p1 - p2) * 1000000000000. <= qMin(qAbs(p1), qAbs(p2))); } -Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) Q_REQUIRED_RESULT Q_DECL_UNUSED; -Q_DECL_CONSTEXPR static inline bool qFuzzyCompare(float p1, float p2) +Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyCompare(float p1, float p2) { return (qAbs(p1 - p2) * 100000.f <= qMin(qAbs(p1), qAbs(p2))); } -Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED; -Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(double d) +Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyIsNull(double d) { return qAbs(d) <= 0.000000000001; } -Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED; -Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) +Q_REQUIRED_RESULT Q_DECL_CONSTEXPR static inline Q_DECL_UNUSED bool qFuzzyIsNull(float f) { return qAbs(f) <= 0.00001f; } @@ -812,8 +808,7 @@ Q_DECL_CONSTEXPR static inline bool qFuzzyIsNull(float f) check whether the actual value is 0 or close to 0, but whether it is binary 0, disregarding sign. */ -static inline bool qIsNull(double d) Q_REQUIRED_RESULT Q_DECL_UNUSED; -static inline bool qIsNull(double d) +Q_REQUIRED_RESULT static inline Q_DECL_UNUSED bool qIsNull(double d) { union U { double d; @@ -829,8 +824,7 @@ static inline bool qIsNull(double d) check whether the actual value is 0 or close to 0, but whether it is binary 0, disregarding sign. */ -static inline bool qIsNull(float f) Q_REQUIRED_RESULT Q_DECL_UNUSED; -static inline bool qIsNull(float f) +Q_REQUIRED_RESULT static inline Q_DECL_UNUSED bool qIsNull(float f) { union U { float f; |