summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2018-08-09 17:13:05 +0300
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2018-08-10 11:19:24 +0300
commitfc0745a699a0ef60c080e9c2ff5eaecde9cb5306 (patch)
tree3fce11a275f3022bdc9f8b14fe9b5f07f0ab68b3 /src
parentc2f7d8a9fd8d59499379dac20b50dab79be5e2f9 (diff)
downloadqtlocation-mapboxgl-fc0745a699a0ef60c080e9c2ff5eaecde9cb5306.tar.gz
[core] Fix build when building Qt Location plugin for Android
- log2 is not available on Android before API 18. - Android doesn't have 'round' on the std:: namespace when using g++. Co-authored-by: Thiago Marcos P. Santos <thiago@mapbox.com>
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.cpp4
-rw-r--r--src/mbgl/util/tile_cover.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.cpp b/src/mbgl/renderer/buckets/symbol_bucket.cpp
index 027e864be5..a3f652fc6e 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.cpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.cpp
@@ -193,8 +193,8 @@ void SymbolBucket::sortFeatures(const float angle) {
std::sort(symbolInstanceIndexes.begin(), symbolInstanceIndexes.end(), [sin, cos, this](size_t &aIndex, size_t &bIndex) {
const SymbolInstance& a = symbolInstances[aIndex];
const SymbolInstance& b = symbolInstances[bIndex];
- const int32_t aRotated = static_cast<int32_t>(std::lround(sin * a.anchor.point.x + cos * a.anchor.point.y));
- const int32_t bRotated = static_cast<int32_t>(std::lround(sin * b.anchor.point.x + cos * b.anchor.point.y));
+ const int32_t aRotated = static_cast<int32_t>(::lround(sin * a.anchor.point.x + cos * a.anchor.point.y));
+ const int32_t bRotated = static_cast<int32_t>(::lround(sin * b.anchor.point.x + cos * b.anchor.point.y));
return aRotated != bRotated ?
aRotated < bRotated :
a.dataFeatureIndex > b.dataFeatureIndex;
diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp
index 3f39e53d40..f58d1270bd 100644
--- a/src/mbgl/util/tile_cover.cpp
+++ b/src/mbgl/util/tile_cover.cpp
@@ -4,6 +4,7 @@
#include <mbgl/map/transform_state.hpp>
#include <mbgl/util/tile_cover_impl.hpp>
#include <mbgl/util/tile_coordinate.hpp>
+#include <mbgl/math/log2.hpp>
#include <functional>
#include <list>