Apply just the changes from the MLT branch which aren't really part of that work (#3793)
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user