From 78ec33320ff5837f23e85e336716692f63fd0254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Mon, 3 Aug 2015 15:01:35 +0200 Subject: don't use certain STL functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 
some functions defined in , as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android --- include/mbgl/util/projection.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/mbgl/util/projection.hpp b/include/mbgl/util/projection.hpp index f301d93005..9563900851 100644 --- a/include/mbgl/util/projection.hpp +++ b/include/mbgl/util/projection.hpp @@ -33,16 +33,16 @@ public: static inline double getMetersPerPixelAtLatitude(const double lat, const double zoom) { const double mapPixelWidthAtZoom = std::pow(2.0, zoom) * util::tileSize; - const double constrainedLatitude = std::fmin(std::fmax(lat, -util::LATITUDE_MAX), util::LATITUDE_MAX); + const double constrainedLatitude = ::fmin(::fmax(lat, -util::LATITUDE_MAX), util::LATITUDE_MAX); return std::cos(constrainedLatitude * util::DEG2RAD) * util::M2PI * util::EARTH_RADIUS_M / mapPixelWidthAtZoom; } static inline const ProjectedMeters projectedMetersForLatLng(const LatLng latLng) { - const double constrainedLatitude = std::fmin(std::fmax(latLng.latitude, -util::LATITUDE_MAX), util::LATITUDE_MAX); + const double constrainedLatitude = ::fmin(::fmax(latLng.latitude, -util::LATITUDE_MAX), util::LATITUDE_MAX); const double m = 1 - 1e-15; - const double f = std::fmin(std::fmax(std::sin(util::DEG2RAD * constrainedLatitude), -m), m); + const double f = ::fmin(::fmax(std::sin(util::DEG2RAD * constrainedLatitude), -m), m); const double easting = util::EARTH_RADIUS_M * latLng.longitude * util::DEG2RAD; const double northing = 0.5 * util::EARTH_RADIUS_M * std::log((1 + f) / (1 - f)); @@ -54,7 +54,7 @@ public: double latitude = (2 * std::atan(std::exp(projectedMeters.northing / util::EARTH_RADIUS_M)) - (M_PI / 2)) * util::RAD2DEG; double longitude = projectedMeters.easting * util::RAD2DEG / util::EARTH_RADIUS_M; - latitude = std::fmin(std::fmax(latitude, -util::LATITUDE_MAX), util::LATITUDE_MAX); + latitude = ::fmin(::fmax(latitude, -util::LATITUDE_MAX), util::LATITUDE_MAX); return LatLng(latitude, longitude); } -- cgit v1.2.1