Apply just the changes from the MLT branch which aren't really part of that work (#3793)

This commit is contained in:
Tim Sylvester
2025-09-11 16:39:58 -07:00
committed by GitHub
parent 921251b973
commit bc025fca49
44 changed files with 181 additions and 123 deletions

View File

@@ -14,7 +14,6 @@
#include <memory>
#include <unordered_map>
#include <vector>
#include <optional>
namespace mbgl {

View File

@@ -20,7 +20,8 @@ using namespace std::numbers;
namespace mbgl {
static double signedArea(const GeometryCoordinates& ring) {
namespace {
double signedArea(const GeometryCoordinates& ring) {
double sum = 0;
for (std::size_t i = 0, len = ring.size(), j = len - 1; i < len; j = i++) {
@@ -32,7 +33,7 @@ static double signedArea(const GeometryCoordinates& ring) {
return sum;
}
static LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
MLN_TRACE_FUNC();
LinearRing<int32_t> result;
@@ -43,7 +44,7 @@ static LinearRing<int32_t> toWagyuPath(const GeometryCoordinates& ring) {
return result;
}
static GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipolygon) {
GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipolygon) {
MLN_TRACE_FUNC();
GeometryCollection result;
@@ -54,6 +55,7 @@ static GeometryCollection toGeometryCollection(MultiPolygon<int16_t>&& multipoly
}
return result;
}
} // namespace
GeometryCollection fixupPolygons(const GeometryCollection& rings) {
MLN_TRACE_FUNC();

View File

@@ -47,9 +47,8 @@ TileLoader<T>::TileLoader(T& tile_,
// initial std::optional part of the request.
loadFromCache();
} else if (necessity == TileNecessity::Required) {
// When the file source doesn't support cache-only requests, and we
// definiitely need this data, we can start out with a network request
// immediately.
// When the file source doesn't support cache-only requests, and we definitely
// need this data, we can start out with a network request immediately.
loadFromNetwork();
} else {
// When the FileSource doesn't support cache-only requests, we do