summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2020-11-20 10:22:54 +0100
committerKonstantin Käfer <mail@kkaefer.com>2020-11-20 10:22:54 +0100
commit993ae88abe4caf2c867a53457e0e8b845b9e30f5 (patch)
tree7ad2de75a5fd971df8c68d281509a54aa40a59c0
parentb8edc2399b9640498ccbbbb5b8f058c63d070933 (diff)
downloadqtlocation-mapboxgl-upstream/fix-clang-compile-errors.tar.gz
[build] fix compilation errors with new Clang/Xcodeupstream/fix-clang-compile-errors
-rw-r--r--include/mbgl/util/indexed_tuple.hpp4
-rw-r--r--src/mbgl/style/expression/within.cpp2
-rw-r--r--src/mbgl/tile/geometry_tile_data.cpp10
3 files changed, 8 insertions, 8 deletions
diff --git a/include/mbgl/util/indexed_tuple.hpp b/include/mbgl/util/indexed_tuple.hpp
index 99d73d1e19..fc22d1ee35 100644
--- a/include/mbgl/util/indexed_tuple.hpp
+++ b/include/mbgl/util/indexed_tuple.hpp
@@ -30,12 +30,12 @@ public:
template <class I>
auto& get() {
- return std::get<TypeIndex<I, Is...>::value, Ts...>(*this);
+ return std::get<TypeIndex<I, Is...>::value>(*this);
}
template <class I>
const auto& get() const {
- return std::get<TypeIndex<I, Is...>::value, Ts...>(*this);
+ return std::get<TypeIndex<I, Is...>::value>(*this);
}
template <class... Us>
diff --git a/src/mbgl/style/expression/within.cpp b/src/mbgl/style/expression/within.cpp
index 2b8a6a65bf..b66015465f 100644
--- a/src/mbgl/style/expression/within.cpp
+++ b/src/mbgl/style/expression/within.cpp
@@ -39,7 +39,7 @@ Polygon<int64_t> getTilePolygon(const Polygon<double>& polygon,
for (const auto& ring : polygon) {
LinearRing<int64_t> temp;
temp.reserve(ring.size());
- for (const auto p : ring) {
+ for (const auto& p : ring) {
const auto coord = latLonToTileCoodinates(p, canonical);
temp.push_back(coord);
updateBBox(bbox, coord);
diff --git a/src/mbgl/tile/geometry_tile_data.cpp b/src/mbgl/tile/geometry_tile_data.cpp
index 472b07739b..c7be54d824 100644
--- a/src/mbgl/tile/geometry_tile_data.cpp
+++ b/src/mbgl/tile/geometry_tile_data.cpp
@@ -198,7 +198,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
[&](const MultiPoint<double>& points) -> GeometryCollection {
MultiPoint<int16_t> result;
result.reserve(points.size());
- for (const auto p : points) {
+ for (const auto& p : points) {
result.emplace_back(latLonToTileCoodinates(p));
}
return {std::move(result)};
@@ -206,7 +206,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
[&](const LineString<double>& lineString) -> GeometryCollection {
LineString<int16_t> result;
result.reserve(lineString.size());
- for (const auto p : lineString) {
+ for (const auto& p : lineString) {
result.emplace_back(latLonToTileCoodinates(p));
}
return {std::move(result)};
@@ -217,7 +217,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
for (const auto& line : lineStrings) {
LineString<int16_t> temp;
temp.reserve(line.size());
- for (const auto p : line) {
+ for (const auto& p : line) {
temp.emplace_back(latLonToTileCoodinates(p));
}
result.emplace_back(temp);
@@ -230,7 +230,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
for (const auto& ring : polygon) {
LinearRing<int16_t> temp;
temp.reserve(ring.size());
- for (const auto p : ring) {
+ for (const auto& p : ring) {
temp.emplace_back(latLonToTileCoodinates(p));
}
result.emplace_back(temp);
@@ -244,7 +244,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
for (const auto& r : pg) {
LinearRing<int16_t> ring;
ring.reserve(r.size());
- for (const auto p : r) {
+ for (const auto& p : r) {
ring.emplace_back(latLonToTileCoodinates(p));
}
result.emplace_back(ring);