From dac48f0417f818ef4e1ef8ba81be64def5154067 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 27 Aug 2012 19:53:50 +0100 Subject: Fix compilation on QNX including declares the standard maths functions in the std namespace not the global namespace. Change-Id: I293cba5ed166b4f122bb34bca5c1d508e2dda259 Reviewed-by: Aaron McCarthy --- src/location/maps/qgeocameratiles.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/location/maps/qgeocameratiles.cpp') 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(floor(d->camera_.zoomLevel())); + int zoom = static_cast(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(floor(d->camera_.zoomLevel())); + d->intZoomLevel_ = static_cast(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 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 > xIntersects = tileIntersections(x1, @@ -784,7 +784,7 @@ QSet 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 > yIntersects = tileIntersections(y1, -- cgit v1.2.1