[gcc4.9] Keep compatibility with GCC + Android

Needed by Qt builds on Android.
This commit is contained in:
Thiago Marcos P. Santos
2017-10-30 19:16:26 +02:00
parent 8c716fde96
commit c65465c02e
2 changed files with 4 additions and 4 deletions

View File

@@ -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:

View File

@@ -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);
}