From b4dfb4754dc1bb9743fbdba0ac6bbdfe31d5ac47 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 8 Apr 2021 10:24:18 +0300 Subject: [PATCH 1/5] [build] fix build for Xcode 12 --- include/mbgl/util/indexed_tuple.hpp | 4 ++-- src/mbgl/style/expression/within.cpp | 2 +- src/mbgl/tile/geometry_tile_data.cpp | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/mbgl/util/indexed_tuple.hpp b/include/mbgl/util/indexed_tuple.hpp index 99d73d1e198..fc22d1ee357 100644 --- a/include/mbgl/util/indexed_tuple.hpp +++ b/include/mbgl/util/indexed_tuple.hpp @@ -30,12 +30,12 @@ class IndexedTuple, TypeList> : public std::tuple template auto& get() { - return std::get::value, Ts...>(*this); + return std::get::value>(*this); } template const auto& get() const { - return std::get::value, Ts...>(*this); + return std::get::value>(*this); } template diff --git a/src/mbgl/style/expression/within.cpp b/src/mbgl/style/expression/within.cpp index 2b8a6a65bf3..b66015465f2 100644 --- a/src/mbgl/style/expression/within.cpp +++ b/src/mbgl/style/expression/within.cpp @@ -39,7 +39,7 @@ Polygon getTilePolygon(const Polygon& polygon, for (const auto& ring : polygon) { LinearRing 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 472b07739b3..c7be54d8243 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& points) -> GeometryCollection { MultiPoint 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& lineString) -> GeometryCollection { LineString 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 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 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 ring; ring.reserve(r.size()); - for (const auto p : r) { + for (const auto& p : r) { ring.emplace_back(latLonToTileCoodinates(p)); } result.emplace_back(ring); From fa109b37b255e50e7a6c85ce9fc127df6eca6d82 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 8 Apr 2021 10:38:11 +0300 Subject: [PATCH 2/5] [ci] update docker image --- circle.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 977d138127f..959b6c54942 100644 --- a/circle.yml +++ b/circle.yml @@ -191,8 +191,7 @@ workflows: executors: ubuntu-eoan: docker: - # FIXME: Move the image to mbgl/ - - image: tmpsantos/mbgl_ci:1.9 + - image: mbxci/gl-native:db227b323be5dbe284b4cc2a875e63b7e81e0b15 resource_class: xlarge working_directory: /src environment: From 2f6562d46bc33d44b8880334e8f2c5aef4e21ff9 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 8 Apr 2021 10:55:06 +0300 Subject: [PATCH 3/5] [build] Keep msvc build working --- include/mbgl/util/indexed_tuple.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/mbgl/util/indexed_tuple.hpp b/include/mbgl/util/indexed_tuple.hpp index fc22d1ee357..0241b8d79af 100644 --- a/include/mbgl/util/indexed_tuple.hpp +++ b/include/mbgl/util/indexed_tuple.hpp @@ -30,12 +30,20 @@ class IndexedTuple, TypeList> : public std::tuple template auto& get() { +#if _WIN32 + return std::get::value, Ts...>(*this); +#else return std::get::value>(*this); +#endif } template const auto& get() const { +#if _WIN32 + return std::get::value, Ts...>(*this); +#else return std::get::value>(*this); +#endif } template From b24980538e0986d03ab56fb646417e02bb521905 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 8 Apr 2021 11:02:39 +0300 Subject: [PATCH 4/5] [build] node - exclude node 15.x --- platform/node/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/node/CMakeLists.txt b/platform/node/CMakeLists.txt index 1369ab2d33e..8f1d967c535 100644 --- a/platform/node/CMakeLists.txt +++ b/platform/node/CMakeLists.txt @@ -20,6 +20,7 @@ add_node_module( 72 79 83 + 88 ) target_sources( From 3422034afa8f5e9c8b3b40d140fb9515596d1d79 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 8 Apr 2021 13:25:32 +0300 Subject: [PATCH 5/5] try older image --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 959b6c54942..106d1eed9ee 100644 --- a/circle.yml +++ b/circle.yml @@ -191,7 +191,7 @@ workflows: executors: ubuntu-eoan: docker: - - image: mbxci/gl-native:db227b323be5dbe284b4cc2a875e63b7e81e0b15 + - image: mbxci/gl-native:c1ff30af1934135723b4ccb3ab97c2b68c0ef980 resource_class: xlarge working_directory: /src environment: