summaryrefslogtreecommitdiff
path: root/include/mbgl/math
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-05-29 14:07:32 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-06-04 10:43:21 +0200
commitd66251234d7c0feb875b9490ca945ee9d43306c1 (patch)
tree3c661091edb98ac15a8711e93fde774a5e6e824a /include/mbgl/math
parentd232a7a6f30927cb7e9107c9357bc53e2b1ae0f9 (diff)
downloadqtlocation-mapboxgl-d66251234d7c0feb875b9490ca945ee9d43306c1.tar.gz
[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
Diffstat (limited to 'include/mbgl/math')
-rw-r--r--include/mbgl/math/log2.hpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/include/mbgl/math/log2.hpp b/include/mbgl/math/log2.hpp
index 53d5e45545..6a1ba23ed9 100644
--- a/include/mbgl/math/log2.hpp
+++ b/include/mbgl/math/log2.hpp
@@ -2,7 +2,6 @@
#include <cmath>
#include <cstdint>
-#include <type_traits>
namespace mbgl {
namespace util {
@@ -11,17 +10,5 @@ namespace util {
// (== number of bits required to store x)
uint32_t ceil_log2(uint64_t x);
-template <typename T>
-typename std::enable_if_t<std::is_floating_point<T>::value, T> log2(T x)
-{
-// log2() is producing wrong results on ARMv5 binaries
-// running on ARMv7+ CPUs.
-#if defined(__ANDROID__)
- return ::log(x) / M_LN2;
-#else
- return ::log2(x);
-#endif
-}
-
} // namespace util
} // namespace mbgl