diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-10-30 19:16:26 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-10-30 19:16:26 +0200 |
commit | f8c7ef7d45c0c94bc784ed1e767d34e1ef3581b1 (patch) | |
tree | 73c13ac7039bda2cedd865846645091b87b147b3 | |
parent | 484c04a924565feade99f162826152fcf3acb8b9 (diff) | |
download | qtlocation-mapboxgl-upstream/tmpsantos-gcc4_again.tar.gz |
[gcc4.9] Keep compatibility with GCC + Androidupstream/tmpsantos-gcc4_again
Needed by Qt builds on Android.
-rw-r--r-- | include/mbgl/util/projection.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/util/projection.hpp b/include/mbgl/util/projection.hpp index f64502c5bc..1613af3b36 100644 --- a/include/mbgl/util/projection.hpp +++ b/include/mbgl/util/projection.hpp @@ -92,8 +92,8 @@ public: const double t2z = tileSize * std::pow(2, zoom); Point<double> pt = project_(point, t2z); // Flip y coordinate - auto x = std::round(std::min(pt.x, t2z)); - auto y = std::round(std::min(t2z - pt.y, t2z)); + auto x = ::round(std::min(pt.x, t2z)); + auto y = ::round(std::min(t2z - pt.y, t2z)); return { x, y }; } private: diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index c81becb986..39b562d811 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -182,10 +182,10 @@ uint64_t tileCount(const LatLngBounds& bounds, uint8_t zoom, uint16_t tileSize_) auto y1 = floor(sw.y/ tileSize_); auto y2 = floor((ne.y - 1) / tileSize_); - auto minX = std::fmax(std::min(x1, x2), 0); + auto minX = ::fmax(std::min(x1, x2), 0); auto maxX = std::max(x1, x2); auto minY = (std::pow(2, zoom) - 1) - std::max(y1, y2); - auto maxY = (std::pow(2, zoom) - 1) - std::fmax(std::min(y1, y2), 0); + auto maxY = (std::pow(2, zoom) - 1) - ::fmax(std::min(y1, y2), 0); return (maxX - minX + 1) * (maxY - minY + 1); } |