summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal.h
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/qglobal.h
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/qglobal.h')
-rw-r--r--src/corelib/global/qglobal.h4
1 files changed, 2 insertions, 2 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>