summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-01-05 16:29:24 +0200
committerBruno de Oliveira Abinader <brunoabinader@gmail.com>2018-01-09 13:24:46 +0000
commit8dd711a9e9dd88195bc85d3e15b30dd1384aebae (patch)
tree007415253c5180a0547590fb5588ce2300993a88 /src
parent00483471fc14dc8a99fb64489358bdddb64bd676 (diff)
downloadqtlocation-8dd711a9e9dd88195bc85d3e15b30dd1384aebae.tar.gz
Use custom namespace in QtLocation's earcut
The custom namespace avoids clashes with mapbox-gl-native's own earcut.hpp dependency. Task-number: QTBUG-65262 Change-Id: Ic5121e88dca45c01af7ce26e38a99a0cd2d1c88e Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/earcut/earcut.hpp4
m---------src/3rdparty/mapbox-gl-native0
-rw-r--r--src/location/declarativemaps/qdeclarativepolygonmapitem.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/earcut/earcut.hpp b/src/3rdparty/earcut/earcut.hpp
index 287be028..ba3fb17a 100644
--- a/src/3rdparty/earcut/earcut.hpp
+++ b/src/3rdparty/earcut/earcut.hpp
@@ -9,7 +9,7 @@
#include <memory>
#include <vector>
-namespace mapbox {
+namespace qt_mapbox {
namespace util {
@@ -771,7 +771,7 @@ void Earcut<N>::removeNode(Node* p) {
template <typename N = uint32_t, typename Polygon>
std::vector<N> earcut(const Polygon& poly) {
- mapbox::detail::Earcut<N> earcut;
+ qt_mapbox::detail::Earcut<N> earcut;
earcut(poly);
return earcut.indices;
}
diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
-Subproject 8c1be4ec01ef46bf453856531ebf53b48ce3dbe
+Subproject 572822c8ca15be190b43afbf7f91d132e988bf2
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
index 7460a376..6b58a061 100644
--- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
@@ -304,7 +304,7 @@ void QGeoMapPolygonGeometry::updateScreenPoints(const QGeoMap &map)
screenIndices_.clear();
for (const auto &p : poly)
screenVertices_ << QPointF(p[0], p[1]);
- std::vector<N> indices = mapbox::earcut<N>(polygon);
+ std::vector<N> indices = qt_mapbox::earcut<N>(polygon);
for (const auto &i: indices)
screenIndices_ << quint32(i);
}