summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-11-10 20:04:41 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-11-11 12:47:42 (GMT)
commit72c170b64056a59dce9f849a5789d2968071f7b9 (patch)
tree0fe45271f034f845b3f3cf7ceeeb856c1b52f3bd /src/corelib/global
parentc327076817dad875bd057bf28eab36b1d4e732ef (diff)
downloadQt-72c170b64056a59dce9f849a5789d2968071f7b9.zip
Qt-72c170b64056a59dce9f849a5789d2968071f7b9.tar.gz
Qt-72c170b64056a59dce9f849a5789d2968071f7b9.tar.bz2
Revert "Using qreal more consistently in code (prevent misuse of double)"
This reverts commit 676780d515cedca85829ae962e4f501c5e5b6581. Conflicts: src/gui/painting/qblendfunctions.cpp
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/global/qnumeric_p.h6
2 files changed, 2 insertions, 8 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 6befb33..9558256 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1081,14 +1081,14 @@ template <typename T>
inline T qAbs(const T &t) { return t >= 0 ? t : -t; }
inline int qRound(qreal d)
-{ return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); }
+{ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); }
#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE) || defined(QT_ARCH_SYMBIAN)
inline qint64 qRound64(double d)
{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); }
#else
inline qint64 qRound64(qreal d)
-{ return d >= 0.0 ? qint64(d + qreal(0.5)) : qint64(d - qreal(qint64(d-1)) + qreal(0.5)) + qint64(d-1); }
+{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); }
#endif
template <typename T>
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index 3f7b5b5..c8b5735 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -57,12 +57,6 @@
QT_BEGIN_NAMESPACE
-static const qreal Q_PI = qreal(3.14159265358979323846); // pi
-static const qreal Q_2PI = qreal(6.28318530717958647693); // 2*pi
-static const qreal Q_PI2 = qreal(1.57079632679489661923); // pi/2
-static const qreal Q_PI180 = qreal(0.01745329251994329577); // pi/180
-static const qreal Q_180PI = qreal(57.29577951308232087685); // 180/pi
-
#if !defined(Q_CC_MIPS)
static const union { unsigned char c[8]; double d; } qt_be_inf_bytes = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } };