diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-08-27 19:53:50 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 05:09:43 +0200 |
commit | dac48f0417f818ef4e1ef8ba81be64def5154067 (patch) | |
tree | daa1acd7c67b7d4c3716f53b49939f12db6ca431 /src/location/maps/qgeocameratiles.cpp | |
parent | 64a5278704db4103018c73901c2f949c9df3afac (diff) | |
download | qtlocation-dac48f0417f818ef4e1ef8ba81be64def5154067.tar.gz |
Fix compilation on QNX
including <cmath> declares the standard maths functions in the std
namespace not the global namespace.
Change-Id: I293cba5ed166b4f122bb34bca5c1d508e2dda259
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/maps/qgeocameratiles.cpp')
-rw-r--r-- | src/location/maps/qgeocameratiles.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/location/maps/qgeocameratiles.cpp b/src/location/maps/qgeocameratiles.cpp index 6ee6593f..8ec71932 100644 --- a/src/location/maps/qgeocameratiles.cpp +++ b/src/location/maps/qgeocameratiles.cpp @@ -145,7 +145,7 @@ void QGeoCameraTiles::findPrefetchTiles() d->tiles_.clear(); // qDebug() << "prefetch called"; - int zoom = static_cast<int>(floor(d->camera_.zoomLevel())); + int zoom = static_cast<int>(std::floor(d->camera_.zoomLevel())); d->intZoomLevel_ = zoom; d->sideLength_ = 1 << d->intZoomLevel_; d->updateGeometry(PREFETCH_FRUSTUM_SCALE); @@ -205,7 +205,7 @@ void QGeoCameraTiles::setCamera(const QGeoCameraData &camera) return; d->camera_ = camera; - d->intZoomLevel_ = static_cast<int>(floor(d->camera_.zoomLevel())); + d->intZoomLevel_ = static_cast<int>(std::floor(d->camera_.zoomLevel())); d->sideLength_ = 1 << d->intZoomLevel_; d->tiles_.clear(); @@ -337,7 +337,7 @@ Frustum QGeoCameraTilesPrivate::frustum(double fieldOfViewGradient) const double f = qMin(screenSize_.width(), screenSize_.height()) / (1.0 * tileSize_); - double z = pow(2.0, camera_.zoomLevel() - intZoomLevel_); + double z = std::pow(2.0, camera_.zoomLevel() - intZoomLevel_); double altitude = f / (2.0 * z); QDoubleVector3D eye = center; @@ -772,7 +772,7 @@ QSet<QGeoTileSpec> QGeoCameraTilesPrivate::tilesFromPolygon(const Polygon &polyg double x2 = polygon.at(i2).get(0); bool xFixed = qFuzzyCompare(x1, x2); - bool xIntegral = qFuzzyCompare(x1, floor(x1)) || qFuzzyCompare(x1 + 1.0, floor(x1 + 1.0)); + bool xIntegral = qFuzzyCompare(x1, std::floor(x1)) || qFuzzyCompare(x1 + 1.0, std::floor(x1 + 1.0)); QList<QPair<double, int> > xIntersects = tileIntersections(x1, @@ -784,7 +784,7 @@ QSet<QGeoTileSpec> QGeoCameraTilesPrivate::tilesFromPolygon(const Polygon &polyg double y2 = polygon.at(i2).get(1); bool yFixed = qFuzzyCompare(y1, y2); - bool yIntegral = qFuzzyCompare(y1, floor(y1)) || qFuzzyCompare(y1 + 1.0, floor(y1 + 1.0)); + bool yIntegral = qFuzzyCompare(y1, std::floor(y1)) || qFuzzyCompare(y1 + 1.0, std::floor(y1 + 1.0)); QList<QPair<double, int> > yIntersects = tileIntersections(y1, |