diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-13 12:02:19 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-19 10:49:03 +0000 |
commit | 373ce8878321aa561b55131bada78ad4a2ce8427 (patch) | |
tree | 0b64429ea79163f1f13b4073bbe60040047d0540 /src/quick/items/qquickpathview.cpp | |
parent | 6f264b755501fd322d1e357187b42120210a7ba3 (diff) |
Cleanup math function includes and usage
Use std::math on floats and doubles, and qMath on qreals, and only
include the math headers actually needed.
Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r-- | src/quick/items/qquickpathview.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 0f3b24bbec..66b0e5c292 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -47,8 +47,8 @@ #include <QtGui/qguiapplication.h> #include <QtGui/qstylehints.h> #include <QtCore/qmath.h> -#include <math.h> +#include <cmath> QT_BEGIN_NAMESPACE @@ -56,12 +56,8 @@ const qreal MinimumFlickVelocity = 75.0; inline qreal qmlMod(qreal x, qreal y) { -#ifdef QT_USE_MATH_H_FLOATS - if (sizeof(qreal) == sizeof(float)) - return fmodf(float(x), float(y)); - else -#endif - return fmod(x, y); + using std::fmod; + return fmod(x, y); } static QQmlOpenMetaObjectType *qPathViewAttachedType = 0; |