From d66251234d7c0feb875b9490ca945ee9d43306c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 29 May 2018 14:07:32 +0200 Subject: [core] don't use floating point versions of pow/log GLIBC 2.27 added new versioned symbols of powf and logf, while the double versions of pow and log remained stable. Prefer the double version to avoid introducing a dependency on a newer version of GLIBC than strictly necessary. See https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00000.html --- src/mbgl/renderer/sources/render_image_source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mbgl/renderer/sources') diff --git a/src/mbgl/renderer/sources/render_image_source.cpp b/src/mbgl/renderer/sources/render_image_source.cpp index dce5e40185..2ce046a7a0 100644 --- a/src/mbgl/renderer/sources/render_image_source.cpp +++ b/src/mbgl/renderer/sources/render_image_source.cpp @@ -139,7 +139,7 @@ void RenderImageSource::update(Immutable baseImpl_, auto dx = nePoint.x - swPoint.x; auto dy = nePoint.y - swPoint.y; auto dMax = std::max(dx, dy); - double zoom = std::max(0.0, std::floor(-util::log2(dMax))); + double zoom = std::max(0.0, std::floor(-::log2(dMax))); // Only enable if the long side of the image is > 2 pixels. Resulting in a // display of at least 2 x 1 px image -- cgit v1.2.1