Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit b4dfb47

Browse files
committed
[build] fix build for Xcode 12
1 parent b8edc23 commit b4dfb47

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

include/mbgl/util/indexed_tuple.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ class IndexedTuple<TypeList<Is...>, TypeList<Ts...>> : public std::tuple<Ts...>
3030

3131
template <class I>
3232
auto& get() {
33-
return std::get<TypeIndex<I, Is...>::value, Ts...>(*this);
33+
return std::get<TypeIndex<I, Is...>::value>(*this);
3434
}
3535

3636
template <class I>
3737
const auto& get() const {
38-
return std::get<TypeIndex<I, Is...>::value, Ts...>(*this);
38+
return std::get<TypeIndex<I, Is...>::value>(*this);
3939
}
4040

4141
template <class... Us>

src/mbgl/style/expression/within.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Polygon<int64_t> getTilePolygon(const Polygon<double>& polygon,
3939
for (const auto& ring : polygon) {
4040
LinearRing<int64_t> temp;
4141
temp.reserve(ring.size());
42-
for (const auto p : ring) {
42+
for (const auto& p : ring) {
4343
const auto coord = latLonToTileCoodinates(p, canonical);
4444
temp.push_back(coord);
4545
updateBBox(bbox, coord);

src/mbgl/tile/geometry_tile_data.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
198198
[&](const MultiPoint<double>& points) -> GeometryCollection {
199199
MultiPoint<int16_t> result;
200200
result.reserve(points.size());
201-
for (const auto p : points) {
201+
for (const auto& p : points) {
202202
result.emplace_back(latLonToTileCoodinates(p));
203203
}
204204
return {std::move(result)};
205205
},
206206
[&](const LineString<double>& lineString) -> GeometryCollection {
207207
LineString<int16_t> result;
208208
result.reserve(lineString.size());
209-
for (const auto p : lineString) {
209+
for (const auto& p : lineString) {
210210
result.emplace_back(latLonToTileCoodinates(p));
211211
}
212212
return {std::move(result)};
@@ -217,7 +217,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
217217
for (const auto& line : lineStrings) {
218218
LineString<int16_t> temp;
219219
temp.reserve(line.size());
220-
for (const auto p : line) {
220+
for (const auto& p : line) {
221221
temp.emplace_back(latLonToTileCoodinates(p));
222222
}
223223
result.emplace_back(temp);
@@ -230,7 +230,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
230230
for (const auto& ring : polygon) {
231231
LinearRing<int16_t> temp;
232232
temp.reserve(ring.size());
233-
for (const auto p : ring) {
233+
for (const auto& p : ring) {
234234
temp.emplace_back(latLonToTileCoodinates(p));
235235
}
236236
result.emplace_back(temp);
@@ -244,7 +244,7 @@ GeometryCollection convertGeometry(const Feature::geometry_type& geometryTileFea
244244
for (const auto& r : pg) {
245245
LinearRing<int16_t> ring;
246246
ring.reserve(r.size());
247-
for (const auto p : r) {
247+
for (const auto& p : r) {
248248
ring.emplace_back(latLonToTileCoodinates(p));
249249
}
250250
result.emplace_back(ring);

0 commit comments

Comments
 (0)